Possible fix for extra brackets
This commit is contained in:
parent
72b32a918f
commit
64825ef6f7
1 changed files with 2 additions and 2 deletions
4
bb.sh
4
bb.sh
|
@ -360,7 +360,7 @@ create_html_page() {
|
|||
echo '<!-- entry begin -->' >> "$filename" # marks the beginning of the whole post
|
||||
echo '<h3><a class="ablack" href="'$global_url/$file_url'">' >> "$filename"
|
||||
# remove possible <p>'s on the title because of markdown conversion
|
||||
echo "$(echo "$title" | sed 's/\<\/*p\>//g')" >> "$filename"
|
||||
echo "$(echo "$title" | sed 's/<\/*p>//g')" >> "$filename"
|
||||
echo '</a></h3>' >> "$filename"
|
||||
if [[ "$timestamp" == "" ]]; then
|
||||
echo '<div class="subtitle">'$(LC_ALL=$date_locale date +"$date_format")' — ' >> "$filename"
|
||||
|
@ -401,7 +401,7 @@ parse_file() {
|
|||
if [[ "$title" == "" ]]; then
|
||||
title="$line"
|
||||
# remove extra <p> and </p> added by markdown
|
||||
filename="$(echo $title | sed 's/\<\/*p\>//g' | tr [:upper:] [:lower:])"
|
||||
filename="$(echo $title | sed 's/<\/*p>//g' | tr [:upper:] [:lower:])"
|
||||
filename="$(echo $filename | sed 's/\ /-/g')"
|
||||
filename="$(echo $filename | tr -dc '[:alnum:]-')" # html likes alphanumeric
|
||||
filename="$filename.html"
|
||||
|
|
Loading…
Reference in a new issue