commonmark-extensions 0.2.0.2 → 0.2.0.3
raw patch · 4 files changed
+20/−2 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- changelog.md +5/−0
- commonmark-extensions.cabal +1/−1
- src/Commonmark/Extensions/Autolink.hs +1/−1
- test/autolinks.md +13/−0
changelog.md view
@@ -1,5 +1,10 @@ # Changelog for commonmark-extensions +## 0.2.0.3++- Add some new test examples to the autolinks extension spec (#65).+- Allow interior `~` characters in autolinks (#65).+ ## 0.2.0.2 - Remove unnecessary Typeable constraint on `TaskList` and
commonmark-extensions.cabal view
@@ -1,5 +1,5 @@ name: commonmark-extensions-version: 0.2.0.2+version: 0.2.0.3 synopsis: Pure Haskell commonmark parser. description: This library provides some useful extensions to core commonmark
src/Commonmark/Extensions/Autolink.hs view
@@ -55,7 +55,7 @@ linkSuffix = try $ do toks <- getInput let possibleSuffixTok (Tok (Symbol c) _ _) =- c `notElem` ['<','>','{','}','|','\\','^','~','[',']','`']+ c `notElem` ['<','>','{','}','|','\\','^','[',']','`'] possibleSuffixTok (Tok WordChars _ _) = True possibleSuffixTok _ = False let isDroppable (Tok (Symbol c) _ _) =
test/autolinks.md view
@@ -41,9 +41,12 @@ Visit www.commonmark.org. Visit www.commonmark.org/a.b.++Visit www.commonmark.org/~jm/foo/bar.pdf. . <p>Visit <a href="http://www.commonmark.org">www.commonmark.org</a>.</p> <p>Visit <a href="http://www.commonmark.org/a.b">www.commonmark.org/a.b</a>.</p>+<p>Visit <a href="http://www.commonmark.org/~jm/foo/bar.pdf">www.commonmark.org/~jm/foo/bar.pdf</a>.</p> ```````````````````````````````` When an autolink ends in `)`, we scan the entire autolink for the total number@@ -154,4 +157,14 @@ <p><a href="mailto:a.b-c_d@a.b">a.b-c_d@a.b</a>.</p> <p>a.b-c_d@a.b-</p> <p>a.b-c_d@a.b_</p>+````````````````````````````````++The autolinks extension should not interfere with regular links+(#65).+++```````````````````````````````` example+[a link](http://www.google.com/)stuff+.+<p><a href="http://www.google.com/">a link</a>stuff</p> ````````````````````````````````