Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6c3bec2
Update spec to CommonMark 0.29, sync regression tests
robinst Apr 11, 2019
d08f5dc
Change how newlines/spaces are handled in inline code (spec 0.29)
robinst Apr 11, 2019
62d5f10
Info strings for tilde code blocks can contain backticks and tildes (…
robinst Apr 11, 2019
9e10d39
Allow internal delim runs to match if both have lengths that are mult…
robinst Apr 11, 2019
a3cc5f0
Fix pathological case with input `[\\\\...` (a lot of backslashes)
robinst Apr 11, 2019
e368db3
Fix pathological case with input `[]([]([](...`
robinst Apr 11, 2019
ccff691
Changes to link destination parsing (spec 0.29)
robinst Apr 11, 2019
79c0a7c
Disallow unescaped '(' in link title
robinst Apr 11, 2019
8e36380
Adapt link reference definition parsing to spec changes
robinst Apr 15, 2019
0f4613a
Extract link scanning logic and replace use of regexes
robinst Jun 1, 2019
7fee127
Make link reference definition parsing incremental
robinst Jul 11, 2019
320d570
Cleanup after extracting link reference definition parsing
robinst Jul 11, 2019
bdbc9d3
Fix edge cases around link parsing
robinst Jul 11, 2019
48614f3
Disallow lists indented more than 3 spaces (spec 0.29)
robinst Jul 11, 2019
e760f75
Adjust delimiter test to not use code block marker
robinst Jul 11, 2019
08b7748
Adjust tests to spec changes
robinst Jul 11, 2019
490af42
Update regression tests from commonmark.js
robinst Jul 11, 2019
ab7c1c7
No longer treat <meta> as a block tag (spec 0.29)
robinst Jul 11, 2019
c5f5a34
Don't preserve entities when rendering HTML attributes
robinst Jul 11, 2019
c8ccf85
Fix strikethrough test by avoiding confusion with code block
robinst Jul 12, 2019
b1d8bb4
Adjust max length for decimal/numeric entities
robinst Jul 12, 2019
3011dcb
Adjust comment and remove TODO
robinst Jul 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
with the exception that 0.x versions can break between minor versions.

## Unreleased
### Added
- `InlineParserContext.getLinkReferenceDefinition` was added to allow
custom inline parsers to look up definitions for reference links.
### Changed
- Link reference definition parsing has been changed according to the
spec: Definitions can now be in setext headings too.
- Check non-null arguments early and provide a nicer message

## [0.12.1] - 2018-11-13
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void unmatched() {

@Test
public void threeInnerThree() {
assertRendering("~~~foo~~~", "<p>~<del>foo</del>~</p>\n");
assertRendering("a ~~~foo~~~", "<p>a ~<del>foo</del>~</p>\n");
}

@Test
Expand Down
67 changes: 64 additions & 3 deletions commonmark-test-util/src/main/resources/cmark-regression.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Issue #113: EOL character weirdness on Windows
(Important: first line ends with CR + CR + LF)

```````````````````````````````` example
line1

line1
line2
.
<p>line1</p>
Expand Down Expand Up @@ -82,7 +81,8 @@ Issue #193 - unescaped left angle brackets in link destination

[a]: <te<st>
.
<p><a href="%3Cte%3Cst%3E">a</a></p>
<p>[a]</p>
<p>[a]: &lt;te<st></p>
````````````````````````````````

Issue #192 - escaped spaces in link destination
Expand All @@ -93,3 +93,64 @@ Issue #192 - escaped spaces in link destination
.
<p>[a](te\ st)</p>
````````````````````````````````

Issue #527 - meta tags in inline contexts

```````````````````````````````` example
City:
<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City">
<meta itemprop="name" content="Springfield">
</span>
.
<p>City:
<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City">
<meta itemprop="name" content="Springfield">
</span></p>
````````````````````````````````

Issue #530 - link parsing corner cases

```````````````````````````````` example
[a](\ b)

[a](<<b)

[a](<b
)
.
<p>[a](\ b)</p>
<p>[a](&lt;&lt;b)</p>
<p>[a](&lt;b
)</p>
````````````````````````````````

Issue commonmark#526 - unescaped ( in link title

```````````````````````````````` example
[link](url ((title))
.
<p>[link](url ((title))</p>
````````````````````````````````

Issue commonamrk#517 - script, pre, style close tag without
opener.

```````````````````````````````` example
</script>

</pre>

</style>
.
</script>
</pre>
</style>
````````````````````````````````

Issue #289.

```````````````````````````````` example
[a](<b) c>
.
<p>[a](&lt;b) c&gt;</p>
````````````````````````````````
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ bar</li>
Type 7 HTML block followed by whitespace (#98).

```````````````````````````````` example
<a>
<a>
x
.
<a>
<a>
x
````````````````````````````````

Expand Down Expand Up @@ -95,10 +95,67 @@ Issue #116 - tabs before and after ATX closing heading
<h1>foo</h1>
````````````````````````````````

commonmark/CommonMark#493 - escaped space not allowed in link
destination.
commonmark/CommonMark#493 - escaped space not allowed in link destination.

```````````````````````````````` example
[link](a\ b)
.
<p>[link](a\ b)</p>
````````````````````````````````

Issue #527 - meta tags in inline contexts

```````````````````````````````` example
City:
<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City">
<meta itemprop="name" content="Springfield">
</span>
.
<p>City:
<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City">
<meta itemprop="name" content="Springfield">
</span></p>
````````````````````````````````

Double-encoding.

```````````````````````````````` example
[XSS](javascript&amp;colon;alert%28&#039;XSS&#039;%29)
.
<p><a href="javascript&amp;colon;alert('XSS')">XSS</a></p>
````````````````````````````````

Issue commonamrk#517 - script, pre, style close tag without
opener.

```````````````````````````````` example
</script>

</pre>

</style>
.
</script>
</pre>
</style>
````````````````````````````````

Issue #289.

```````````````````````````````` example
[a](<b) c>
.
<p>[a](&lt;b) c&gt;</p>
````````````````````````````````

Issue #161.

```````````````````````````````` example
*failed to be italic!*\
text
.
<p><em>failed to be italic!</em><br />
text</p>
````````````````````````````````


Loading