packages feed

commonmark-extensions 0.2.3.4 → 0.2.3.5

raw patch · 6 files changed

+22/−5 lines, 6 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

changelog.md view
@@ -1,5 +1,9 @@ # Changelog for commonmark-extensions +## 0.2.3.5++  - Resolve entities inside wikilinks (#105, Michał Kukieła).+ ## 0.2.3.4    - Require whitespace after definition list marker (#104).
commonmark-extensions.cabal view
@@ -1,5 +1,5 @@ name:           commonmark-extensions-version:        0.2.3.4+version:        0.2.3.5 synopsis:       Pure Haskell commonmark parser. description:    This library provides some useful extensions to core commonmark
src/Commonmark/Extensions/RebaseRelativePaths.hs view
@@ -11,7 +11,6 @@ import qualified Data.Text as T import Data.Maybe (fromMaybe) import Text.Parsec (getPosition)-import Text.Parsec.Pos (sourceName) import System.FilePath import qualified System.FilePath.Windows as Windows import qualified System.FilePath.Posix as Posix
src/Commonmark/Extensions/Wikilinks.hs view
@@ -9,6 +9,7 @@   , HasWikilinks(..)   ) where+import Commonmark.Entity import Commonmark.Types import Commonmark.Tokens import Commonmark.Syntax@@ -51,11 +52,11 @@          isPipe _ = False      let (title, url) =            case break isPipe toks of-              (xs, [])   -> (untokenize xs, untokenize xs)+              (xs, [])   -> (unEntity xs, unEntity xs)               (xs, _:ys) ->                 case titlepos of-                  TitleBeforePipe -> (untokenize xs, untokenize ys)-                  TitleAfterPipe  -> (untokenize ys, untokenize xs)+                  TitleBeforePipe -> (unEntity xs, unEntity ys)+                  TitleAfterPipe  -> (unEntity ys, unEntity xs)      symbol ']'      symbol ']'      return $ wikilink (strip url) (str (strip title))
@@ -31,3 +31,10 @@ <p><a href="Name%20of%20page" title="wikilink">Title</a></p> ```````````````````````````````` +HTML entities are recognized both in the name of page and in the link title.++```````````````````````````````` example+[[Gesch&uuml;tztes Leerzeichen|&#xDC;ber &amp;nbsp;]]+.+<p><a href="Gesch%C3%BCtztes%20Leerzeichen" title="wikilink">Über &amp;nbsp;</a></p>+````````````````````````````````
@@ -39,4 +39,10 @@ <p><a href="Name%20of%20page">Title</a></p> ```````````````````````````````` +HTML entities are recognized both in the name of page and in the link title. +```````````````````````````````` example+[[&#xDC;ber &amp;nbsp;|Gesch&uuml;tztes Leerzeichen]]+.+<p><a href="Gesch%C3%BCtztes%20Leerzeichen" title="wikilink">Über &amp;nbsp;</a></p>+````````````````````````````````