support h4 titles
This commit is contained in:
parent
e76d43b440
commit
730e3cb989
2 changed files with 12 additions and 0 deletions
|
|
@ -72,6 +72,14 @@ do
|
|||
# converting .gmi files in .html
|
||||
/usr/local/bin/gmnitohtml < "$gmi_file" > "$tempdir/body.html"
|
||||
|
||||
# trick to support h4 titles
|
||||
lines=$(grep "<h3># .*<\/h3>" "$tempdir/body.html")
|
||||
while read -r line; do
|
||||
fixed_line=${line//<h3># /<h4>} # replace '<h3># ' by '<h4>'
|
||||
fixed_line=${fixed_line//<\/h3>/<\/h4>} # replace '</h3>' by '</h4>'
|
||||
sed -i "s~$line~$fixed_line~" "$tempdir/body.html"
|
||||
done <<< "$lines"
|
||||
|
||||
# retrieving of the path of the current .gmi file
|
||||
file_path="$(dirname "$gmi_file")"
|
||||
# retrieving of the filename of the current .gmi file, without its extension
|
||||
|
|
|
|||
|
|
@ -64,6 +64,10 @@
|
|||
content: "### ";
|
||||
}
|
||||
|
||||
h4::before {
|
||||
content: "#### ";
|
||||
}
|
||||
|
||||
blockquote::before {
|
||||
content: "> ";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue