Skip to content

Commit

Permalink
added ability to parse and test horizontal rule from markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
rokaicker committed Sep 30, 2022
1 parent bfb3b2c commit c45f2c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ function generateSite(file, lang, stylesheet = ''){
<h2>${text}</h2>
`;
}
else if (line === '---'){
body += `
<hr>
`;
}
else if (line != "")
{
//convert markdown link to href
Expand Down
4 changes: 4 additions & 0 deletions test/test-folder/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ This line is to test bold in different forms such as : **asterisk bold** and __u
This line is to test bold and italics combined : ***asterisk bold and italic*** and ___underscore bold and italic___.

This line is to test the code block: `this is a piece of code`

The following line is to test the horizontal rule parsing
---
This line is to ensure the horizontal rule was generated correctly in html.

0 comments on commit c45f2c2

Please sign in to comment.