packages feed

djot 0.1.2.3 → 0.1.2.4

raw patch · 4 files changed

+19/−5 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # Revision history for djot +## 0.1.2.4 -- 2025-11-30++* Ensure that `'95--'96` doesn't get parsed as singlequoted.++* Properly handle bare `'}` for right single-quote (#12).+ ## 0.1.2.3 -- 2025-09-27  * Fix swallowing of indentation in code under blockquote (#11).
djot.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.0 name:               djot-version:            0.1.2.3+version:            0.1.2.4 synopsis:           Parser and renderer for djot light markup syntax. description:        Djot (<https://djot.net>) is a light markup language.                     This package provides a data structure to represent
src/Djot/Inlines.hs view
@@ -8,7 +8,7 @@   ) where -import Data.Char (isAscii, isLetter, isAlphaNum, isSymbol, isPunctuation)+import Data.Char (isAscii, isAlphaNum, isSymbol, isPunctuation) import Control.Monad (guard, when, mzero) import Data.Sequence (Seq) import qualified Data.Sequence as Seq@@ -480,8 +480,8 @@   lbrace <- (True <$ asciiChar '{') <|> pure False   asciiChar '\''   rbrace <- (True <$ asciiChar '}') <|> pure False-  letterAfter <- (True <$ lookahead (satisfy isLetter)) <|> pure False-  guard $ not lbrace && (rbrace || not (whitespaceBefore || letterAfter))+  alphaNumAfter <- (True <$ lookahead (satisfy isAlphaNum)) <|> pure False+  guard $ not lbrace && (rbrace || not (whitespaceBefore || alphaNumAfter))  pSingleQuote :: P Inlines pSingleQuote = (do@@ -489,7 +489,7 @@   contents <- mconcat <$> many (fails pCloseSingleQuote *> pInline)   (singleQuoted contents <$ pCloseSingleQuote)     <|> pure (closeSingleQuote <> contents))- <|> (closeSingleQuote <$ asciiChar '\'')+ <|> (closeSingleQuote <$ (pCloseSingleQuote <|> asciiChar '\''))  closeSingleQuote :: Inlines closeSingleQuote = str "\226\128\153" -- utf8 0x2019
test/regression.test view
@@ -207,3 +207,11 @@ </code></pre> </blockquote> ```++Issue #12:++```+I like the Lemon Jelly album titled '}64–'}95.+.+<p>I like the Lemon Jelly album titled ’64–’95.</p>+```