Skip to content

Commit

Permalink
update for CommonMark Spec 0.28
Browse files Browse the repository at this point in the history
  • Loading branch information
vsch committed Aug 8, 2017
1 parent 48b7ba0 commit bc5fa4f
Show file tree
Hide file tree
Showing 62 changed files with 10,640 additions and 501 deletions.
4 changes: 2 additions & 2 deletions MarkdownProcessorsEmulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ determining whether a text line is:
* current item's sub-item

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

Expand Down Expand Up @@ -57,7 +57,7 @@ The following definitions are used:

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

* CommonMark: version 0.27 of the spec, all common mark parsers
* CommonMark: of the spec, all common mark parsers
* Definitions/Defaults:
* `ITEM_INDENT` = 4 <!-- not used -->
* `CODE_INDENT` = 4
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![Flexmark Icon Logo](/assets/images/flexmark-icon-logo%402x.png) flexmark-java
===============================================================================

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

Its strengths are speed, flexibility, Markdown source element based AST with details of the
Expand Down Expand Up @@ -42,7 +42,7 @@ following sample:
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-all</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
```

Expand Down Expand Up @@ -85,7 +85,7 @@ public class BasicSample {
#### Building via Gradle

```shell
compile 'com.vladsch.flexmark:flexmark-all:0.24.0'
compile 'com.vladsch.flexmark:flexmark-all:0.26.0'
```

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

### Latest Additions

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

Major processor families are implemented and some family members also:

* [CommonMark] (spec 0.27)
* [CommonMark] for latest implemented spec, currently [CommonMark (spec 0.28)]
* [CommonMark (spec 0.27)] for specific version compatibility
* [CommonMark (spec 0.28)] for specific version compatibility
* [ ] &nbsp;[League/CommonMark]
* [GitHub] Comments
* [ ] [Jekyll]
Expand Down Expand Up @@ -560,6 +565,8 @@ BSD (2-clause) licensed, see [LICENSE.txt] file.

[All about me]: https://vladsch.com/about
[CommonMark]: http://commonmark.org/
[CommonMark (spec 0.27)]: http://spec.commonmark.org/0.27/
[CommonMark (spec 0.28)]: http://spec.commonmark.org/0.28/
[commonmark-java]: https://github.com/atlassian/commonmark-java
[commonMarkSpec.md]: https://github.com/vsch/idea-multimarkdown/blob/master/test/data/performance/commonMarkSpec.md
[Extensions.java]: flexmark-profile-pegdown/src/main/java/com/vladsch/flexmark/profiles/pegdown/Extensions.java
Expand Down
25 changes: 25 additions & 0 deletions VERSION.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ flexmark-java
[TOC]: # " "

- [To Do](#to-do)
- [0.26.0](#0260)
- [0.24.0](#0240)
- [0.22.24](#02224)
- [0.22.22](#02222)
Expand Down Expand Up @@ -168,6 +169,30 @@ flexmark-java

&nbsp;</details>

0.26.0
------

* Fix: Update parser to CommonMark Spec 0.28, the only effect on parsing is:

* `***foo***` is now parsed as `italic(bold())` whereas previously it was `bold(italic())`.

Use `ParserEmulationProfile.COMMONMARK_0_27` or just set the `Parser.STRONG_WRAPS_EMPHASIS`
to `true` to get old parsing behaviour.

* Matched Nested parentheses in link URLs now do not need to be escaped. `[foo](fun(bar))`
will now be parsed as a link, previously it would be a `[foo]` reference followed by text
`(fun(bar))`.

Use `ParserEmulationProfile.COMMONMARK_0_27` or just set the
`Parser.LINKS_ALLOW_MATCHED_PARENTHESES` to `false` to get old parsing behaviour.

* Add: profiles for `COMMONMARK_0_26`, `COMMONMARK_0_27`, `COMMONMARK_0_28`, with `COMMONMARK`
defaulting to the most recent implemented spec: 0.28 for now. The 0.26 profile only differs
from the 0.27 by using double blank lines to terminate lists. Delimiter parsing is not
downgraded from 0.27

* Add: spec tests for 0.27 and 0.28 which use the version specific emulation profiles.

0.24.0
------

Expand Down
64 changes: 32 additions & 32 deletions flexmark-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-java</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</parent>

<artifactId>flexmark-all</artifactId>
Expand All @@ -21,157 +21,157 @@
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-abbreviation</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-anchorlink</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-aside</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-autolink</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-definition</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-emoji</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-escaped-character</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-footnotes</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-gfm-issues</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-gfm-strikethrough</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-gfm-tables</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-gfm-tasklist</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-gfm-users</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-jekyll-front-matter</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-jekyll-tag</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-ins</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-xwiki-macros</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-superscript</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-tables</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-toc</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-typographic</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-wikilink</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-ext-yaml-front-matter</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-formatter</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-html-parser</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-jira-converter</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-pdf-converter</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-profile-pegdown</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-util</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-youtrack-converter</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion flexmark-ext-abbreviation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-java</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</parent>

<artifactId>flexmark-ext-abbreviation</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions flexmark-ext-anchorlink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-java</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</parent>

<artifactId>flexmark-ext-anchorlink</artifactId>
Expand All @@ -28,7 +28,7 @@
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-jira-converter</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion flexmark-ext-aside/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-java</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</parent>

<artifactId>flexmark-ext-aside</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion flexmark-ext-autolink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-java</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</parent>

<artifactId>flexmark-ext-autolink</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion flexmark-ext-definition/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-java</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</parent>

<artifactId>flexmark-ext-definition</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion flexmark-ext-emoji/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-java</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</parent>

<artifactId>flexmark-ext-emoji</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion flexmark-ext-escaped-character/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-java</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</parent>

<artifactId>flexmark-ext-escaped-character</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion flexmark-ext-footnotes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-java</artifactId>
<version>0.24.0</version>
<version>0.26.0</version>
</parent>

<artifactId>flexmark-ext-footnotes</artifactId>
Expand Down
Loading

0 comments on commit bc5fa4f

Please sign in to comment.