-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(parser): fix issue with comments inside nested code blocks
Code blocks containing comments are now converted correctly when nested in list items. Closes #288
- Loading branch information
Showing
13 changed files
with
105 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!-- a comment --> | ||
|
||
<!-- a comment with *bogus* __markdown__ inside --> | ||
|
||
<p>words <!-- a comment --> words</p> | ||
|
||
<!-- comment --> | ||
|
||
<p>words</p> | ||
|
||
<!-- comment --> | ||
|
||
<pre><code><!-- comment --> | ||
</code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- a comment --> | ||
|
||
<!-- a comment with *bogus* __markdown__ inside --> | ||
|
||
words <!-- a comment --> words | ||
|
||
<!-- comment --> words | ||
|
||
<!-- comment --> | ||
|
||
<!-- comment --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<ul> | ||
<li><p>list item 1</p> | ||
|
||
<pre><code class="html language-html"><a href="www.google.com">google</a> | ||
<div> | ||
<div>some div</div> | ||
</div> | ||
</code></pre></li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- list item 1 | ||
|
||
```html | ||
<a href="www.google.com">google</a> | ||
<div> | ||
<div>some div</div> | ||
</div> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<p><a href="foo">some text</a> words</p> | ||
|
||
<p><br> words</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<a href="foo">some text</a> words | ||
|
||
<br> words |
21 changes: 21 additions & 0 deletions
21
...blocks-containing-xml-comments-are-not-converted-correctly-when-nested-in-list-items.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<ul> | ||
<li><p>list item 1</p> | ||
|
||
<pre><code><parent> | ||
<child>child1</child> | ||
<!-- This is a comment --> | ||
<child>child2</child> | ||
<child>some text <!-- a comment --></child> | ||
</parent> | ||
</code></pre></li> | ||
|
||
<li><p>list item 2</p></li> | ||
</ul> | ||
|
||
<pre><code><parent> | ||
<child>child1</child> | ||
<!-- This is a comment --> | ||
<child>child2</child> | ||
<child>some text <!-- a comment --></child> | ||
</parent> | ||
</code></pre> |
21 changes: 21 additions & 0 deletions
21
...ontaining-xml-comments-are-not-converted-correctly-when-nested-in-list-items.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
* list item 1 | ||
|
||
``` | ||
<parent> | ||
<child>child1</child> | ||
<!-- This is a comment --> | ||
<child>child2</child> | ||
<child>some text <!-- a comment --></child> | ||
</parent> | ||
``` | ||
* list item 2 | ||
``` | ||
<parent> | ||
<child>child1</child> | ||
<!-- This is a comment --> | ||
<child>child2</child> | ||
<child>some text <!-- a comment --></child> | ||
</parent> | ||
``` |