Browse Source

Fixed title of page as well

Matt Traudt 11 years ago
parent
commit
c1a400a368
1 changed files with 2 additions and 2 deletions
  1. 2 2
      bb.sh

+ 2 - 2
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"