diff options
| author | Asko Nõmm <asko@bien.ee> | 2022-04-15 19:56:01 +0200 |
|---|---|---|
| committer | Asko Nõmm <asko@bien.ee> | 2022-04-15 19:56:01 +0200 |
| commit | ce96dd264fd2385303f48259e5e8d1431d22b91d (patch) | |
| tree | 70b08a04aa7261c64ccb4f21f1b4bc34d86b1a2a /resources/test | |
| parent | 58970486f0c0fdb9470ef28e510f5c90060e2ced (diff) | |
Implement Markdown correction mechanism
This fixes the issue for ATX headings and code blocks where if there were no empty lines below and above of them it couldn't correctly identify those blocks as what they were.
There's now a Markdown correction function where we can add more of these corrections in the future, making the whole thing a lot easier.
Diffstat (limited to 'resources/test')
| -rw-r--r-- | resources/test/core.md | 9 | ||||
| -rw-r--r-- | resources/test/core_result.html | 10 |
2 files changed, 17 insertions, 2 deletions
diff --git a/resources/test/core.md b/resources/test/core.md index afc972a..f65b20e 100644 --- a/resources/test/core.md +++ b/resources/test/core.md @@ -83,4 +83,11 @@ This is a H1 heading with settext ================================= And this is a H2 heading with settext --------------------------------------
\ No newline at end of file +------------------------------------- + +Testing paragraph right before a code block +``` +code goes here +``` +# Heading goes here +Paragraph right after heading
\ No newline at end of file diff --git a/resources/test/core_result.html b/resources/test/core_result.html index aaad44a..39e8562 100644 --- a/resources/test/core_result.html +++ b/resources/test/core_result.html @@ -58,4 +58,12 @@ function markdownToHTML(markdown) { <h1>This is a H1 heading with settext</h1> -<h2>And this is a H2 heading with settext</h2>
\ No newline at end of file +<h2>And this is a H2 heading with settext</h2> + +<p>Testing paragraph right before a code block</p> + +<pre><code>code goes here</code></pre> + +<h1>Heading goes here</h1> + +<p>Paragraph right after heading</p>
\ No newline at end of file |
