diff --git a/generateHTML.js b/generateHTML.js index 44eef3e..5263c7f 100644 --- a/generateHTML.js +++ b/generateHTML.js @@ -150,6 +150,12 @@ function readMdFile(input) } } + //check if the line is a horizontal rule + if (modifiedLine == "---") + { + modifiedLine = '
'; + } + lineArray.push(modifiedLine); } else @@ -190,11 +196,26 @@ function writeFile(input, result, lang) //try to format the HTML file better if (lineNumber == 0) { - content += "

" + theLine + "

\n"; + //check if the line is an hr tag + if (theLine == "
") + { + content += theLine + "\n"; + } + else + { + content += "

" + theLine + "

\n"; + } } else { - content += "\t

" + theLine + "

\n"; + if (theLine == "
") + { + content += "\t" + theLine + "\n"; + } + else + { + content += "\t

" + theLine + "

\n"; + } } } else diff --git a/markdownTest.md b/markdownTest.md index ecddfe1..f1bcce4 100644 --- a/markdownTest.md +++ b/markdownTest.md @@ -2,6 +2,6 @@ this line has no bolded text this line has **bolded** text. this **line** has **alternating** bolded **text**. - +--- **this entire line should be bolded**.