commonmark 0.1.1.2 → 0.1.1.3
raw patch · 4 files changed
+24/−9 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- changelog.md +6/−0
- commonmark.cabal +1/−1
- src/Commonmark/Inlines.hs +8/−8
- test/regression.md +9/−0
changelog.md view
@@ -1,5 +1,11 @@ # Changelog for commonmark +## 0.1.1.3++* Fix bug in links with spaces at the beginning or end of+ link description (#67). We were putting flankingness constraints+ on the link delimiters, but this isn't requried by the spec.+ ## 0.1.1.2 * Fix bug in fix to #65 (#66).
commonmark.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: commonmark-version: 0.1.1.2+version: 0.1.1.3 synopsis: Pure Haskell commonmark parser. description: This library provides the core data types and functions
src/Commonmark/Inlines.hs view
@@ -315,10 +315,10 @@ Symbol '`' | n > 0 -> go (n+1) pos ts | otherwise -> go (n+1) (tokPos t) ts- _ | n > 0 -> IntMap.alter (\x ->- case x of- Nothing -> Just [pos]- Just ps -> Just (pos:ps)) n $ go 0 pos ts+ _ | n > 0 -> IntMap.alter (\case+ Nothing -> Just [pos]+ Just ps -> Just (pos:ps))+ n (go 0 pos ts) | otherwise -> go 0 pos ts pChunk :: (IsInline a, Monad m)@@ -728,8 +728,8 @@ , absoluteBottom = chunkPos chunk' } - (Just opener@(Chunk Delim{ delimCanOpen = True, delimType = '[' } _ _),- Just closer@(Chunk Delim{ delimCanClose = True, delimType = ']'} closePos _)) ->+ (Just opener@(Chunk Delim{ delimType = '[' } _ _),+ Just closer@(Chunk Delim{ delimType = ']'} closePos _)) -> let chunksinside = takeWhile (\ch -> chunkPos ch /= closePos) (afters left) isBracket (Chunk Delim{ delimType = c' } _ _) =@@ -831,10 +831,10 @@ } - (_, Just (Chunk Delim{ delimCanClose = True, delimType = ']' } _ _))+ (_, Just (Chunk Delim{ delimType = ']' } _ _)) -> processBs bracketedSpecs st{ leftCursor = moveLeft left } - (Just _, Just (Chunk Delim{ delimCanOpen = True, delimType = '[' } _ _))+ (Just _, Just (Chunk Delim{ delimType = '[' } _ _)) -> processBs bracketedSpecs st{ leftCursor = right , rightCursor = moveRight right }
test/regression.md view
@@ -194,3 +194,12 @@ </li> </ul> ````````````````````````````````++Issue #67.+```````````````````````````````` example+[test ](http://www.example.com/)+[ test](http://www.example.com/)+.+<p><a href="http://www.example.com/">test </a>+<a href="http://www.example.com/"> test</a></p>+````````````````````````````````