Fixed title of page as well
This commit is contained in:
parent
64825ef6f7
commit
c1a400a368
1 changed files with 2 additions and 2 deletions
4
bb.sh
4
bb.sh
|
@ -399,9 +399,9 @@ parse_file() {
|
||||||
title=""
|
title=""
|
||||||
while read line; do
|
while read line; do
|
||||||
if [[ "$title" == "" ]]; then
|
if [[ "$title" == "" ]]; then
|
||||||
title="$line"
|
title=$(echo "$line" | sed 's/<\/*p>//g')
|
||||||
# remove extra <p> and </p> added by markdown
|
# remove extra <p> and </p> added by markdown
|
||||||
filename="$(echo $title | sed 's/<\/*p>//g' | tr [:upper:] [:lower:])"
|
filename="$(echo $title | tr [:upper:] [:lower:])"
|
||||||
filename="$(echo $filename | sed 's/\ /-/g')"
|
filename="$(echo $filename | sed 's/\ /-/g')"
|
||||||
filename="$(echo $filename | tr -dc '[:alnum:]-')" # html likes alphanumeric
|
filename="$(echo $filename | tr -dc '[:alnum:]-')" # html likes alphanumeric
|
||||||
filename="$filename.html"
|
filename="$filename.html"
|
||||||
|
|
Loading…
Reference in a new issue