Small change. (New: if the title is not in the file, use the filename).
This commit is contained in:
@@ -160,6 +160,9 @@ StrapDown2PDF() {
|
||||
# Now we have a pure Markdown file (at least we hope)
|
||||
|
||||
title="$(grep -o -m 1 "<title>[^<]*</title>" "${input}" | grep -o ">.*<" | sed s/">"/""/ | sed s/"<"/""/)"
|
||||
# New: if the title is not in the file, use the filename !
|
||||
defaulttitle="$(echo -e "${name}" | tr _ ' ')"
|
||||
title="${title:-$defaulttitle}"
|
||||
echo -e "${cyan}I found this as a possible title${white} : $u${title}$U." | tee -a /tmp/strapdown2pdf.log
|
||||
|
||||
if [ X"${htm}" = "Xtrue" ]; then
|
||||
|
1
strapdown2pdf.sh
Symbolic link
1
strapdown2pdf.sh
Symbolic link
@@ -0,0 +1 @@
|
||||
strapdown2pdf
|
Reference in New Issue
Block a user