Skip to content

Commit bc5fa4f

Browse files
committed
update for CommonMark Spec 0.28
1 parent 48b7ba0 commit bc5fa4f

File tree

62 files changed

+10640
-501
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+10640
-501
lines changed

MarkdownProcessorsEmulation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ determining whether a text line is:
2424
* current item's sub-item
2525

2626
Some processors, like Kramdown and Markdown, use the list's first item indent to determine when
27-
text is an item, lazy continuation or indented code. CommonMark (spec.txt 0.27), uses the last
27+
text is an item, lazy continuation or indented code. CommonMark, uses the last
2828
item's content indent for this determination. MultiMarkdown, uses a fixed indent of 4 spaces
2929
from left edge or last block quote marker to make that determination.
3030

@@ -57,7 +57,7 @@ The following definitions are used:
5757

5858
Family type rough behavior, details are in the code for `ListBlockParser` and `ListItemParser`:
5959

60-
* CommonMark: version 0.27 of the spec, all common mark parsers
60+
* CommonMark: of the spec, all common mark parsers
6161
* Definitions/Defaults:
6262
* `ITEM_INDENT` = 4 <!-- not used -->
6363
* `CODE_INDENT` = 4

README.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![Flexmark Icon Logo](/assets/images/flexmark-icon-logo%402x.png) flexmark-java
22
===============================================================================
33

4-
**flexmark-java** is a Java implementation of CommonMark 0.27 spec parser using the blocks
4+
**flexmark-java** is a Java implementation of **CommonMark 0.28** spec parser using the blocks
55
first, inlines after Markdown parsing architecture.
66

77
Its strengths are speed, flexibility, Markdown source element based AST with details of the
@@ -42,7 +42,7 @@ following sample:
4242
<dependency>
4343
<groupId>com.vladsch.flexmark</groupId>
4444
<artifactId>flexmark-all</artifactId>
45-
<version>0.24.0</version>
45+
<version>0.26.0</version>
4646
</dependency>
4747
```
4848

@@ -85,7 +85,7 @@ public class BasicSample {
8585
#### Building via Gradle
8686

8787
```shell
88-
compile 'com.vladsch.flexmark:flexmark-all:0.24.0'
88+
compile 'com.vladsch.flexmark:flexmark-all:0.26.0'
8989
```
9090

9191
#### Building with Android Studio
@@ -175,6 +175,9 @@ custom node renderer if you need to override the generated link HTML.
175175

176176
### Latest Additions
177177

178+
* Update library to be [CommonMark (spec 0.28)] compliant and add
179+
`ParserEmulationProfile.COMMONMARK_0_27` and `ParserEmulationProfile.COMMONMARK_0_28` to allow
180+
selecting a specific spec version options.
178181
* Custom node rendering API with ability to invoke standard rendering for an overridden node,
179182
allowing custom node renders that only handle special cases and let the rest be rendered as
180183
usual. See:
@@ -303,7 +306,9 @@ If you find a discrepancy please open an issue so it can be addressed.
303306

304307
Major processor families are implemented and some family members also:
305308

306-
* [CommonMark] (spec 0.27)
309+
* [CommonMark] for latest implemented spec, currently [CommonMark (spec 0.28)]
310+
* [CommonMark (spec 0.27)] for specific version compatibility
311+
* [CommonMark (spec 0.28)] for specific version compatibility
307312
* [ ] &nbsp;[League/CommonMark]
308313
* [GitHub] Comments
309314
* [ ] [Jekyll]
@@ -560,6 +565,8 @@ BSD (2-clause) licensed, see [LICENSE.txt] file.
560565

561566
[All about me]: https://vladsch.com/about
562567
[CommonMark]: http://commonmark.org/
568+
[CommonMark (spec 0.27)]: http://spec.commonmark.org/0.27/
569+
[CommonMark (spec 0.28)]: http://spec.commonmark.org/0.28/
563570
[commonmark-java]: https://github.com/atlassian/commonmark-java
564571
[commonMarkSpec.md]: https://github.com/vsch/idea-multimarkdown/blob/master/test/data/performance/commonMarkSpec.md
565572
[Extensions.java]: flexmark-profile-pegdown/src/main/java/com/vladsch/flexmark/profiles/pegdown/Extensions.java

VERSION.md

+25
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ flexmark-java
66
[TOC]: # " "
77

88
- [To Do](#to-do)
9+
- [0.26.0](#0260)
910
- [0.24.0](#0240)
1011
- [0.22.24](#02224)
1112
- [0.22.22](#02222)
@@ -168,6 +169,30 @@ flexmark-java
168169

169170
&nbsp;</details>
170171

172+
0.26.0
173+
------
174+
175+
* Fix: Update parser to CommonMark Spec 0.28, the only effect on parsing is:
176+
177+
* `***foo***` is now parsed as `italic(bold())` whereas previously it was `bold(italic())`.
178+
179+
Use `ParserEmulationProfile.COMMONMARK_0_27` or just set the `Parser.STRONG_WRAPS_EMPHASIS`
180+
to `true` to get old parsing behaviour.
181+
182+
* Matched Nested parentheses in link URLs now do not need to be escaped. `[foo](fun(bar))`
183+
will now be parsed as a link, previously it would be a `[foo]` reference followed by text
184+
`(fun(bar))`.
185+
186+
Use `ParserEmulationProfile.COMMONMARK_0_27` or just set the
187+
`Parser.LINKS_ALLOW_MATCHED_PARENTHESES` to `false` to get old parsing behaviour.
188+
189+
* Add: profiles for `COMMONMARK_0_26`, `COMMONMARK_0_27`, `COMMONMARK_0_28`, with `COMMONMARK`
190+
defaulting to the most recent implemented spec: 0.28 for now. The 0.26 profile only differs
191+
from the 0.27 by using double blank lines to terminate lists. Delimiter parsing is not
192+
downgraded from 0.27
193+
194+
* Add: spec tests for 0.27 and 0.28 which use the version specific emulation profiles.
195+
171196
0.24.0
172197
------
173198

flexmark-all/pom.xml

+32-32
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.vladsch.flexmark</groupId>
99
<artifactId>flexmark-java</artifactId>
10-
<version>0.24.0</version>
10+
<version>0.26.0</version>
1111
</parent>
1212

1313
<artifactId>flexmark-all</artifactId>
@@ -21,157 +21,157 @@
2121
<dependency>
2222
<groupId>com.vladsch.flexmark</groupId>
2323
<artifactId>flexmark</artifactId>
24-
<version>0.24.0</version>
24+
<version>0.26.0</version>
2525
</dependency>
2626
<dependency>
2727
<groupId>com.vladsch.flexmark</groupId>
2828
<artifactId>flexmark-ext-abbreviation</artifactId>
29-
<version>0.24.0</version>
29+
<version>0.26.0</version>
3030
</dependency>
3131
<dependency>
3232
<groupId>com.vladsch.flexmark</groupId>
3333
<artifactId>flexmark-ext-anchorlink</artifactId>
34-
<version>0.24.0</version>
34+
<version>0.26.0</version>
3535
</dependency>
3636
<dependency>
3737
<groupId>com.vladsch.flexmark</groupId>
3838
<artifactId>flexmark-ext-aside</artifactId>
39-
<version>0.24.0</version>
39+
<version>0.26.0</version>
4040
</dependency>
4141
<dependency>
4242
<groupId>com.vladsch.flexmark</groupId>
4343
<artifactId>flexmark-ext-autolink</artifactId>
44-
<version>0.24.0</version>
44+
<version>0.26.0</version>
4545
</dependency>
4646
<dependency>
4747
<groupId>com.vladsch.flexmark</groupId>
4848
<artifactId>flexmark-ext-definition</artifactId>
49-
<version>0.24.0</version>
49+
<version>0.26.0</version>
5050
</dependency>
5151
<dependency>
5252
<groupId>com.vladsch.flexmark</groupId>
5353
<artifactId>flexmark-ext-emoji</artifactId>
54-
<version>0.24.0</version>
54+
<version>0.26.0</version>
5555
</dependency>
5656
<dependency>
5757
<groupId>com.vladsch.flexmark</groupId>
5858
<artifactId>flexmark-ext-escaped-character</artifactId>
59-
<version>0.24.0</version>
59+
<version>0.26.0</version>
6060
</dependency>
6161
<dependency>
6262
<groupId>com.vladsch.flexmark</groupId>
6363
<artifactId>flexmark-ext-footnotes</artifactId>
64-
<version>0.24.0</version>
64+
<version>0.26.0</version>
6565
</dependency>
6666
<dependency>
6767
<groupId>com.vladsch.flexmark</groupId>
6868
<artifactId>flexmark-ext-gfm-issues</artifactId>
69-
<version>0.24.0</version>
69+
<version>0.26.0</version>
7070
</dependency>
7171
<dependency>
7272
<groupId>com.vladsch.flexmark</groupId>
7373
<artifactId>flexmark-ext-gfm-strikethrough</artifactId>
74-
<version>0.24.0</version>
74+
<version>0.26.0</version>
7575
</dependency>
7676
<dependency>
7777
<groupId>com.vladsch.flexmark</groupId>
7878
<artifactId>flexmark-ext-gfm-tables</artifactId>
79-
<version>0.24.0</version>
79+
<version>0.26.0</version>
8080
</dependency>
8181
<dependency>
8282
<groupId>com.vladsch.flexmark</groupId>
8383
<artifactId>flexmark-ext-gfm-tasklist</artifactId>
84-
<version>0.24.0</version>
84+
<version>0.26.0</version>
8585
</dependency>
8686
<dependency>
8787
<groupId>com.vladsch.flexmark</groupId>
8888
<artifactId>flexmark-ext-gfm-users</artifactId>
89-
<version>0.24.0</version>
89+
<version>0.26.0</version>
9090
</dependency>
9191
<dependency>
9292
<groupId>com.vladsch.flexmark</groupId>
9393
<artifactId>flexmark-ext-jekyll-front-matter</artifactId>
94-
<version>0.24.0</version>
94+
<version>0.26.0</version>
9595
</dependency>
9696
<dependency>
9797
<groupId>com.vladsch.flexmark</groupId>
9898
<artifactId>flexmark-ext-jekyll-tag</artifactId>
99-
<version>0.24.0</version>
99+
<version>0.26.0</version>
100100
</dependency>
101101
<dependency>
102102
<groupId>com.vladsch.flexmark</groupId>
103103
<artifactId>flexmark-ext-ins</artifactId>
104-
<version>0.24.0</version>
104+
<version>0.26.0</version>
105105
</dependency>
106106
<dependency>
107107
<groupId>com.vladsch.flexmark</groupId>
108108
<artifactId>flexmark-ext-xwiki-macros</artifactId>
109-
<version>0.24.0</version>
109+
<version>0.26.0</version>
110110
</dependency>
111111
<dependency>
112112
<groupId>com.vladsch.flexmark</groupId>
113113
<artifactId>flexmark-ext-superscript</artifactId>
114-
<version>0.24.0</version>
114+
<version>0.26.0</version>
115115
</dependency>
116116
<dependency>
117117
<groupId>com.vladsch.flexmark</groupId>
118118
<artifactId>flexmark-ext-tables</artifactId>
119-
<version>0.24.0</version>
119+
<version>0.26.0</version>
120120
</dependency>
121121
<dependency>
122122
<groupId>com.vladsch.flexmark</groupId>
123123
<artifactId>flexmark-ext-toc</artifactId>
124-
<version>0.24.0</version>
124+
<version>0.26.0</version>
125125
</dependency>
126126
<dependency>
127127
<groupId>com.vladsch.flexmark</groupId>
128128
<artifactId>flexmark-ext-typographic</artifactId>
129-
<version>0.24.0</version>
129+
<version>0.26.0</version>
130130
</dependency>
131131
<dependency>
132132
<groupId>com.vladsch.flexmark</groupId>
133133
<artifactId>flexmark-ext-wikilink</artifactId>
134-
<version>0.24.0</version>
134+
<version>0.26.0</version>
135135
</dependency>
136136
<dependency>
137137
<groupId>com.vladsch.flexmark</groupId>
138138
<artifactId>flexmark-ext-yaml-front-matter</artifactId>
139-
<version>0.24.0</version>
139+
<version>0.26.0</version>
140140
</dependency>
141141
<dependency>
142142
<groupId>com.vladsch.flexmark</groupId>
143143
<artifactId>flexmark-formatter</artifactId>
144-
<version>0.24.0</version>
144+
<version>0.26.0</version>
145145
</dependency>
146146
<dependency>
147147
<groupId>com.vladsch.flexmark</groupId>
148148
<artifactId>flexmark-html-parser</artifactId>
149-
<version>0.24.0</version>
149+
<version>0.26.0</version>
150150
</dependency>
151151
<dependency>
152152
<groupId>com.vladsch.flexmark</groupId>
153153
<artifactId>flexmark-jira-converter</artifactId>
154-
<version>0.24.0</version>
154+
<version>0.26.0</version>
155155
</dependency>
156156
<dependency>
157157
<groupId>com.vladsch.flexmark</groupId>
158158
<artifactId>flexmark-pdf-converter</artifactId>
159-
<version>0.24.0</version>
159+
<version>0.26.0</version>
160160
</dependency>
161161
<dependency>
162162
<groupId>com.vladsch.flexmark</groupId>
163163
<artifactId>flexmark-profile-pegdown</artifactId>
164-
<version>0.24.0</version>
164+
<version>0.26.0</version>
165165
</dependency>
166166
<dependency>
167167
<groupId>com.vladsch.flexmark</groupId>
168168
<artifactId>flexmark-util</artifactId>
169-
<version>0.24.0</version>
169+
<version>0.26.0</version>
170170
</dependency>
171171
<dependency>
172172
<groupId>com.vladsch.flexmark</groupId>
173173
<artifactId>flexmark-youtrack-converter</artifactId>
174-
<version>0.24.0</version>
174+
<version>0.26.0</version>
175175
</dependency>
176176
</dependencies>
177177

flexmark-ext-abbreviation/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.vladsch.flexmark</groupId>
66
<artifactId>flexmark-java</artifactId>
7-
<version>0.24.0</version>
7+
<version>0.26.0</version>
88
</parent>
99

1010
<artifactId>flexmark-ext-abbreviation</artifactId>

flexmark-ext-anchorlink/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.vladsch.flexmark</groupId>
66
<artifactId>flexmark-java</artifactId>
7-
<version>0.24.0</version>
7+
<version>0.26.0</version>
88
</parent>
99

1010
<artifactId>flexmark-ext-anchorlink</artifactId>
@@ -28,7 +28,7 @@
2828
<dependency>
2929
<groupId>com.vladsch.flexmark</groupId>
3030
<artifactId>flexmark-jira-converter</artifactId>
31-
<version>0.24.0</version>
31+
<version>0.26.0</version>
3232
<scope>test</scope>
3333
</dependency>
3434
<dependency>

flexmark-ext-aside/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.vladsch.flexmark</groupId>
66
<artifactId>flexmark-java</artifactId>
7-
<version>0.24.0</version>
7+
<version>0.26.0</version>
88
</parent>
99

1010
<artifactId>flexmark-ext-aside</artifactId>

flexmark-ext-autolink/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.vladsch.flexmark</groupId>
66
<artifactId>flexmark-java</artifactId>
7-
<version>0.24.0</version>
7+
<version>0.26.0</version>
88
</parent>
99

1010
<artifactId>flexmark-ext-autolink</artifactId>

flexmark-ext-definition/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.vladsch.flexmark</groupId>
66
<artifactId>flexmark-java</artifactId>
7-
<version>0.24.0</version>
7+
<version>0.26.0</version>
88
</parent>
99

1010
<artifactId>flexmark-ext-definition</artifactId>

flexmark-ext-emoji/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.vladsch.flexmark</groupId>
66
<artifactId>flexmark-java</artifactId>
7-
<version>0.24.0</version>
7+
<version>0.26.0</version>
88
</parent>
99

1010
<artifactId>flexmark-ext-emoji</artifactId>

flexmark-ext-escaped-character/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.vladsch.flexmark</groupId>
66
<artifactId>flexmark-java</artifactId>
7-
<version>0.24.0</version>
7+
<version>0.26.0</version>
88
</parent>
99

1010
<artifactId>flexmark-ext-escaped-character</artifactId>

flexmark-ext-footnotes/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.vladsch.flexmark</groupId>
66
<artifactId>flexmark-java</artifactId>
7-
<version>0.24.0</version>
7+
<version>0.26.0</version>
88
</parent>
99

1010
<artifactId>flexmark-ext-footnotes</artifactId>

0 commit comments

Comments
 (0)