djot 0.1.4 → 0.1.4.1
raw patch · 5 files changed
+34/−6 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +7/−0
- djot.cabal +1/−1
- src/Djot/Inlines.hs +2/−4
- test/Main.hs +1/−1
- test/regression.test +23/−0
CHANGELOG.md view
@@ -1,5 +1,12 @@ # Revision history for djot +## 0.1.4.1 -- 2026-07-21++ * Fix bug in verbatim parsing (#17). We were wrongly allowing+ backslash escapes for backticks.++ * Fix resolution of reference links with newlines (#16).+ ## 0.1.4 -- 2026-03-17 * Ensure that delims aren't matched in link destinations (#15).
djot.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: djot-version: 0.1.4+version: 0.1.4.1 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
@@ -302,8 +302,7 @@ pVerbatim = do numticks <- pTicks let ender = pTicks >>= guard . (== numticks)- let content = skipSome (skipSatisfyByte (\c -> c /= '`' && c /= '\\')) <|>- (asciiChar '\\' <* anyChar) <|>+ let content = skipSome (skipSatisfyByte (/= '`')) <|> (fails ender *> skipSome (asciiChar '`')) bs <- trimSpaces <$> byteStringOf (skipMany content) <* (ender <|> eof) (rawInline <$> pRawAttribute <*> pure bs) <|> pure (verbatim bs)@@ -427,8 +426,7 @@ asciiChar ']' let label = normalizeLabel $ if B.null bs- then B8.filter (/= '\n')- $ inlinesToByteString description+ then inlinesToByteString description else bs pure $ Reference label
test/Main.hs view
@@ -103,7 +103,7 @@ native = either (\_ -> mempty) id $ parser (djot st) expected = native ropts = RenderOptions{ preserveSoftBreaks = True }- renderedDjot = encodeUtf8 . TL.fromStrict $ render (Just 62) $+ renderedDjot = encodeUtf8 . TL.fromStrict $ render (Just 78) $ renderDjot ropts native actual = either (\_ -> mempty) id $ parser renderedDjot lbsToStr = TL.unpack . fromUtf8
test/regression.test view
@@ -255,3 +255,26 @@ </ul> </section> ```++Issue #16:++```+[An Adaptive Preforking+Server Using Shared Memory][]++# An Adaptive Preforking Server Using Shared Memory+.+<p><a href="#An-Adaptive-Preforking-Server-Using-Shared-Memory">An Adaptive Preforking+Server Using Shared Memory</a></p>+<section id="An-Adaptive-Preforking-Server-Using-Shared-Memory">+<h1>An Adaptive Preforking Server Using Shared Memory</h1>+</section>+```++Issue #17++```+the `$\` variable+.+<p>the <code>$\</code> variable</p>+```