Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-commonmark-pandoc for
openSUSE:Factory checked in at 2026-11-06 19:48:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-commonmark-pandoc (Old)
and /work/SRC/openSUSE:Factory/.ghc-commonmark-pandoc.new.3759290 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-commonmark-pandoc"
Fri Nov 6 19:48:28 2026 rev:17 rq:1395517 version:0.3.0.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/ghc-commonmark-pandoc/ghc-commonmark-pandoc.changes
2026-06-10 15:59:11.683739549 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-commonmark-pandoc.new.3759290/ghc-commonmark-pandoc.changes
2026-11-06 19:54:43.188000118 +0100
@@ -1,0 +2,32 @@
+Mon Sep 28 14:53:57 UTC 2026 - Peter Simons <[email protected]>
+
+- Update commonmark-pandoc to version 0.3.0.2.
+ ## 0.3.0.2
+
+ * Fix class attribute so that it is split on spaces and multiple
+ classes added to pandoc Attr.
+
+ ## 0.3.0.1
+
+ * Keep task-list checkbox attached under source positions.
+ With sourcepos enabled, an item's first Plain/Para has already been
+ wrapped in a Div (wrapper="1") by addBlockAttrs before taskList runs,
+ so toTaskListItem's Plain/Para patterns never matched and the
+ checkbox was emitted as a separate Plain block preceding the item
+ contents. Recognize the wrapper Div and insert the checkbox into
+ the Plain/Para inside it.
+
+ * Use B.text for resolved entities. B.str put whitespace inside Str
+ nodes for entities like   and , violating pandoc AST
+ conventions; B.text produces proper Space/SoftBreak elements.
+
+ * Remove redundant illegalCodePoint check.
+
+ * Don't duplicate classes and keys in `addToPandocAttr`.
+ Matches the HTML backend's incorporateAttribute, which never
+ produces duplicate classes or attribute keys.
+
+ * Make the wrapper `data-pos` suppression robust. Don't rely on the
+ wrapper marker being the first entry in the key-value list.
+
+-------------------------------------------------------------------
Old:
----
commonmark-pandoc-0.3.tar.gz
New:
----
commonmark-pandoc-0.3.0.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-commonmark-pandoc.spec ++++++
--- /var/tmp/diff_new_pack.JXsGio/_old 2026-11-06 19:54:44.457053254 +0100
+++ /var/tmp/diff_new_pack.JXsGio/_new 2026-11-06 19:54:44.459053338 +0100
@@ -19,7 +19,7 @@
%global pkg_name commonmark-pandoc
%global pkgver %{pkg_name}-%{version}
Name: ghc-%{pkg_name}
-Version: 0.3
+Version: 0.3.0.2
Release: 0
Summary: Bridge between commonmark and pandoc AST
License: BSD-3-Clause
++++++ commonmark-pandoc-0.3.tar.gz -> commonmark-pandoc-0.3.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/commonmark-pandoc-0.3/changelog.md
new/commonmark-pandoc-0.3.0.2/changelog.md
--- old/commonmark-pandoc-0.3/changelog.md 2001-09-09 03:46:40.000000000
+0200
+++ new/commonmark-pandoc-0.3.0.2/changelog.md 2001-09-09 03:46:40.000000000
+0200
@@ -1,5 +1,33 @@
# Changelog for commonmark-pandoc
+## 0.3.0.2
+
+ * Fix class attribute so that it is split on spaces and multiple
+ classes added to pandoc Attr.
+
+## 0.3.0.1
+
+ * Keep task-list checkbox attached under source positions.
+ With sourcepos enabled, an item's first Plain/Para has already been
+ wrapped in a Div (wrapper="1") by addBlockAttrs before taskList runs,
+ so toTaskListItem's Plain/Para patterns never matched and the
+ checkbox was emitted as a separate Plain block preceding the item
+ contents. Recognize the wrapper Div and insert the checkbox into
+ the Plain/Para inside it.
+
+ * Use B.text for resolved entities. B.str put whitespace inside Str
+ nodes for entities like   and , violating pandoc AST
+ conventions; B.text produces proper Space/SoftBreak elements.
+
+ * Remove redundant illegalCodePoint check.
+
+ * Don't duplicate classes and keys in `addToPandocAttr`.
+ Matches the HTML backend's incorporateAttribute, which never
+ produces duplicate classes or attribute keys.
+
+ * Make the wrapper `data-pos` suppression robust. Don't rely on the
+ wrapper marker being the first entry in the key-value list.
+
## 0.3
* Define Applicative instances of IsBlock, IsInline etc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/commonmark-pandoc-0.3/commonmark-pandoc.cabal
new/commonmark-pandoc-0.3.0.2/commonmark-pandoc.cabal
--- old/commonmark-pandoc-0.3/commonmark-pandoc.cabal 2001-09-09
03:46:40.000000000 +0200
+++ new/commonmark-pandoc-0.3.0.2/commonmark-pandoc.cabal 2001-09-09
03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
name: commonmark-pandoc
-version: 0.3
+version: 0.3.0.2
synopsis: Bridge between commonmark and pandoc AST.
description: This library provides typeclasses for rendering
commonmark to Pandoc types.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/commonmark-pandoc-0.3/src/Commonmark/Pandoc.hs
new/commonmark-pandoc-0.3.0.2/src/Commonmark/Pandoc.hs
--- old/commonmark-pandoc-0.3/src/Commonmark/Pandoc.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/commonmark-pandoc-0.3.0.2/src/Commonmark/Pandoc.hs 2001-09-09
03:46:40.000000000 +0200
@@ -15,7 +15,6 @@
import Data.Maybe (fromMaybe)
import qualified Data.Text as T
-import qualified Data.Text.Read as TR
import Text.Pandoc.Definition
import Text.Pandoc.Walk
import qualified Text.Pandoc.Builder as B
@@ -47,9 +46,7 @@
lineBreak = Cm B.linebreak
softBreak = Cm B.softbreak
str t = Cm $ B.text t
- entity t
- | illegalCodePoint t = Cm $ B.str "\xFFFD"
- | otherwise = Cm $ B.str $ fromMaybe t $ lookupEntity (T.drop 1 t)
+ entity t = Cm $ B.text $ fromMaybe t $ lookupEntity (T.drop 1 t)
escapedChar c = Cm $ B.str $ T.singleton c
emph ils = B.emph <$> ils
strong ils = B.strong <$> ils
@@ -172,8 +169,15 @@
case B.toList $ coerce item of
(Plain ils : rest) -> Plain (checkbox : Space : ils) : rest
(Para ils : rest) -> Para (checkbox : Space : ils) : rest
+ -- with source positions, the item's first block has been wrapped
+ -- in a Div by addBlockAttrs; insert the checkbox inside it:
+ (Div attr (Plain ils : ds) : rest) | isWrapperAttr attr
+ -> Div attr (Plain (checkbox : Space : ils) : ds) : rest
+ (Div attr (Para ils : ds) : rest) | isWrapperAttr attr
+ -> Div attr (Para (checkbox : Space : ils) : ds) : rest
bs -> Plain [checkbox] : bs
where checkbox = Str (if checked then "\9746" else "\9744")
+ isWrapperAttr (_,_,kvs) = lookup "wrapper" kvs == Just "1"
instance Rangeable (Cm a B.Blocks)
=> HasDiv (Cm a B.Blocks) where
@@ -224,12 +228,17 @@
addToPandocAttr :: Attributes -> Attr -> Attr
-- avoid adding spurious extra data-pos to wrapper div (#159):
-addToPandocAttr [("data-pos", _)] attrs@(_,_,("wrapper","1"):_) = attrs
+addToPandocAttr [("data-pos", _)] attrs@(_, _, kvs)
+ | lookup "wrapper" kvs == Just "1" = attrs
addToPandocAttr attrs attr = foldr go attr attrs
where
go ("id", v) (_, cls, kvs) = (v, cls, kvs)
- go ("class", v) (ident, cls, kvs) = (ident, v:cls, kvs)
- go (k, v) (ident, cls, kvs) = (ident, cls, (k,v):kvs)
+ go ("class", v) (ident, cls, kvs)
+ | v `elem` cls = (ident, cls, kvs)
+ | otherwise = (ident, T.words v <> cls, kvs)
+ go (k, v) (ident, cls, kvs)
+ | k `elem` map fst kvs = (ident, cls, kvs)
+ | otherwise = (ident, cls, (k,v):kvs)
instance (Rangeable (Cm a B.Inlines), Rangeable (Cm a B.Blocks))
=> HasFootnote (Cm a B.Inlines) (Cm a B.Blocks) where
@@ -237,22 +246,6 @@
footnoteList _xs = mempty
footnoteRef _num _lab contents = B.note . walk deNote <$> contents
-illegalCodePoint :: T.Text -> Bool
-illegalCodePoint t =
- "&#" `T.isPrefixOf` t &&
- let t' = T.drop 2 $ T.filter (/=';') t
- badvalue (n, r) = not (T.null r) ||
- n < 1 ||
- n > (0x10FFFF :: Integer)
- in
- case T.uncons t' of
- Nothing -> True
- Just (x, rest)
- | x == 'x' || x == 'X'
- -> either (const True) badvalue (TR.hexadecimal rest)
- | otherwise
- -> either (const True) badvalue (TR.decimal t')
-
stringify :: Walkable Inline a => a -> T.Text
stringify = query go . walk (deNote . deQuote)
where go :: Inline -> T.Text