diff --git a/src/MarkdownParser.cxx b/src/MarkdownParser.cxx index f1ebc4e..9c28c84 100644 --- a/src/MarkdownParser.cxx +++ b/src/MarkdownParser.cxx @@ -41,6 +41,7 @@ std::string make_html(std::filesystem::path const &path) { bool tag_b = false, tag_i = false, tag_p = false, + tag_li = false, // If there is an escape character at the end of the buffer, use // this flag to prevent ignoring it. escaping = false, @@ -78,13 +79,15 @@ std::string make_html(std::filesystem::path const &path) { html += ">"; tag_h = 0; } + if (tag_li) html += "", tag_li = false; html += '\n'; break; } // Start paragraph if newline and no // special characters were matched. - if (!tag_p && newline && x == 0 && c != '#') + if (!tag_p && newline && x == 0 && + c != '#' && c != '-') html += "

", tag_p = true; @@ -167,6 +170,16 @@ std::string make_html(std::filesystem::path const &path) { break; } + break; + case '-': + if (x != 0) { + html += c; + break; + } + + html += "

  • "; + ignoreSpace = true; + tag_li = true; break; case ' ': if (ignoreSpace) {