packages feed

commonmark 0.1.0.1 → 0.1.0.2

raw patch · 4 files changed

+30/−6 lines, 4 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 +## 0.1.0.2++* Fix tight/loose list detection with multiple blank lines at end (#56).+ ## 0.1.0.1  * Set source position when we add a token in gobbleSpaces (#54).
commonmark.cabal view
@@ -1,6 +1,6 @@ cabal-version:  2.2 name:           commonmark-version:        0.1.0.1+version:        0.1.0.2 synopsis:       Pure Haskell commonmark parser. description:    This library provides the core data types and functions
src/Commonmark/Blocks.hs view
@@ -65,7 +65,6 @@ #endif import           Data.Char                 (isAsciiUpper, isDigit, isSpace) import           Data.Dynamic-import           Data.List                 (sort) import           Data.Text                 (Text) import qualified Data.Map.Strict           as M import qualified Data.Text                 as T@@ -835,16 +834,15 @@           let lidata = fromDyn (blockData cdata)                                  (ListItemData (BulletList '*')                                    0 False False)-          let blanks = removeConsecutive $ sort $-                         concat $ blockBlanks cdata :+          let allblanks = concat $ blockBlanks cdata :                                   map (blockBlanks . rootLabel)                                   (filter ((== "List") . blockType .                                    blockSpec . rootLabel) children)           curline <- sourceLine <$> getPosition-          let blanksAtEnd = case blanks of+          let blanksAtEnd = case allblanks of                                    (l:_) -> l >= curline - 1                                    _     -> False-          let blanksInside = case length blanks of+          let blanksInside = case length (removeConsecutive allblanks) of                                 n | n > 1     -> True                                   | n == 1    -> not blanksAtEnd                                   | otherwise -> False
test/regression.md view
@@ -172,3 +172,25 @@ </li> </ol> ````````````````````````````````++Issue #56.++```````````````````````````````` example+- a+  - b+  - c++++.+<ul>+<li>a+<ul>+<li>b+</li>+<li>c+</li>+</ul>+</li>+</ul>+````````````````````````````````