Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-commonmark for openSUSE:Factory 
checked in at 2023-12-21 23:38:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-commonmark (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-commonmark.new.1840 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-commonmark"

Thu Dec 21 23:38:11 2023 rev:15 rq:1134293 version:0.2.4.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-commonmark/ghc-commonmark.changes    
2023-11-08 22:17:57.191669767 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-commonmark.new.1840/ghc-commonmark.changes  
2023-12-21 23:38:21.461978143 +0100
@@ -1,0 +2,24 @@
+Mon Dec 11 19:49:15 UTC 2023 - Peter Simons <psim...@suse.com>
+
+- Update commonmark to version 0.2.4.1.
+  ## 0.2.4.1
+
+    * Commonmark.Html: Add `aria-hidden`, `d`, and `viewBox` to allowed 
attributes list.
+
+    * Correctly merge list blanks with non-list blanks (#133, Michael Howell).
+
+    * Do not look for backslashed hard breaks in link titles (#130, Michael 
Howell).
+
+    * Work around ghc bug with `-K` RTS options, to set the stack space 
properly
+      for tests (#129). See https://gitlab.haskell.org/ghc/ghc/-/issues/10445.
+
+    * Revert block state completely if lazy line (#126). This fixes an issue 
with
+      lazily-wrapped footnotes.
+
+    * Avoid adding trailing newline to list block if it's already there
+      (Michael Howell). This fixes tight/loose classification in a few
+      cases.
+
+    * Fix incorrectly parsing links with nested `[]` (Michael Howell).
+
+-------------------------------------------------------------------

Old:
----
  commonmark-0.2.4.tar.gz

New:
----
  commonmark-0.2.4.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-commonmark.spec ++++++
--- /var/tmp/diff_new_pack.EfvFii/_old  2023-12-21 23:38:22.950032408 +0100
+++ /var/tmp/diff_new_pack.EfvFii/_new  2023-12-21 23:38:22.970033138 +0100
@@ -20,7 +20,7 @@
 %global pkgver %{pkg_name}-%{version}
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.2.4
+Version:        0.2.4.1
 Release:        0
 Summary:        Pure Haskell commonmark parser
 License:        BSD-3-Clause

++++++ commonmark-0.2.4.tar.gz -> commonmark-0.2.4.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/commonmark-0.2.4/changelog.md 
new/commonmark-0.2.4.1/changelog.md
--- old/commonmark-0.2.4/changelog.md   2001-09-09 03:46:40.000000000 +0200
+++ new/commonmark-0.2.4.1/changelog.md 2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,25 @@
 # Changelog for commonmark
 
+## 0.2.4.1
+
+  * Commonmark.Html: Add `aria-hidden`, `d`, and `viewBox` to allowed 
attributes list.
+
+  * Correctly merge list blanks with non-list blanks (#133, Michael Howell).
+
+  * Do not look for backslashed hard breaks in link titles (#130, Michael 
Howell).
+
+  * Work around ghc bug with `-K` RTS options, to set the stack space properly
+    for tests (#129). See https://gitlab.haskell.org/ghc/ghc/-/issues/10445.
+
+  * Revert block state completely if lazy line (#126). This fixes an issue with
+    lazily-wrapped footnotes.
+
+  * Avoid adding trailing newline to list block if it's already there
+    (Michael Howell). This fixes tight/loose classification in a few
+    cases.
+
+  * Fix incorrectly parsing links with nested `[]` (Michael Howell).
+
 ## 0.2.4
 
   * Do not parse hard line breaks in fenced codeblock info (#116,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/commonmark-0.2.4/commonmark.cabal 
new/commonmark-0.2.4.1/commonmark.cabal
--- old/commonmark-0.2.4/commonmark.cabal       2001-09-09 03:46:40.000000000 
+0200
+++ new/commonmark-0.2.4.1/commonmark.cabal     2001-09-09 03:46:40.000000000 
+0200
@@ -1,6 +1,6 @@
 cabal-version:  2.2
 name:           commonmark
-version:        0.2.4
+version:        0.2.4.1
 synopsis:       Pure Haskell commonmark parser.
 description:
    This library provides the core data types and functions
@@ -89,7 +89,7 @@
   main-is: test-commonmark.hs
   hs-source-dirs:
       test
-  ghc-options: -threaded -rtsopts -with-rtsopts=-K40K
+  ghc-options: -threaded -rtsopts -with-rtsopts=-K40K -with-rtsopts=-kc40K
   if impl(ghc >= 8.10)
     ghc-options:      -Wunused-packages
   build-depends:
@@ -112,7 +112,7 @@
      , base >= 4.9 && < 5
      , text
      , tasty-bench
-  ghc-options: -threaded -rtsopts -with-rtsopts=-K10K
+  ghc-options: -threaded -rtsopts -with-rtsopts=-K10K -with-rtsopts=-kc10K
   if impl(ghc >= 8.10)
     ghc-options:      -Wunused-packages
   default-language: Haskell2010
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/commonmark-0.2.4/src/Commonmark/Blocks.hs 
new/commonmark-0.2.4.1/src/Commonmark/Blocks.hs
--- old/commonmark-0.2.4/src/Commonmark/Blocks.hs       2001-09-09 
03:46:40.000000000 +0200
+++ new/commonmark-0.2.4.1/src/Commonmark/Blocks.hs     2001-09-09 
03:46:40.000000000 +0200
@@ -70,6 +70,7 @@
 import qualified Data.Text.Read            as TR
 import           Data.Tree
 import           Text.Parsec
+import Data.List (sort)
 
 mkBlockParser
   :: (Monad m, IsBlock il bl)
@@ -135,6 +136,8 @@
           _   -> False }
 
   -- close unmatched blocks
+  -- but first save state so we can revert if we have a lazy line
+  revertState <- getState
   if null unmatched
     then updateState $ \st -> st{ nodeStack = matched }
          -- this update is needed or we lose startpos information
@@ -153,8 +156,9 @@
     (do getState >>= guard . maybeLazy
         -- lazy line
         sp <- getPosition
+        updateState $ const revertState
         updateState $ \st -> st{ nodeStack =
-             map (addStartPos sp) (unmatched ++ matched) })
+             map (addStartPos sp) (nodeStack st) })
       <|>
     void (try (blockStart paraSpec))
       <|>
@@ -862,7 +866,7 @@
           let lidata = fromDyn (blockData cdata)
                                  (ListItemData (BulletList '*')
                                    0 False False)
-          let allblanks = concat $ blockBlanks cdata :
+          let allblanks = reverse . sort . concat $ blockBlanks cdata :
                                   map (blockBlanks . rootLabel)
                                   (filter ((== "List") . blockType .
                                    blockSpec . rootLabel) children)
@@ -940,7 +944,11 @@
           blockBlanks' <- case childrenData of
                              c:_ | listItemBlanksAtEnd c -> do
                                  curline <- sourceLine <$> getPosition
-                                 return $! curline - 1 : blockBlanks cdata
+                                 return $! case blockBlanks cdata of
+                                    lb:b | lb == curline - 1 ->
+                                        lb:b
+                                    b ->
+                                       curline - 1 : b
                              _ -> return $! blockBlanks cdata
           let ldata' = toDyn (ListData lt ls)
           -- need to transform paragraphs on tight lists
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/commonmark-0.2.4/src/Commonmark/Html.hs 
new/commonmark-0.2.4.1/src/Commonmark/Html.hs
--- old/commonmark-0.2.4/src/Commonmark/Html.hs 2001-09-09 03:46:40.000000000 
+0200
+++ new/commonmark-0.2.4.1/src/Commonmark/Html.hs       2001-09-09 
03:46:40.000000000 +0200
@@ -207,6 +207,7 @@
   , "allowpaymentrequest"
   , "allowusermedia"
   , "alt"
+  , "aria-hidden"
   , "as"
   , "async"
   , "autocapitalize"
@@ -225,6 +226,7 @@
   , "controls"
   , "coords"
   , "crossorigin"
+  , "d"
   , "data"
   , "datetime"
   , "decoding"
@@ -405,6 +407,7 @@
   , "updateviacache"
   , "usemap"
   , "value"
+  , "viewBox"
   , "width"
   , "workertype"
   , "wrap"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/commonmark-0.2.4/src/Commonmark/Inlines.hs 
new/commonmark-0.2.4.1/src/Commonmark/Inlines.hs
--- old/commonmark-0.2.4/src/Commonmark/Inlines.hs      2001-09-09 
03:46:40.000000000 +0200
+++ new/commonmark-0.2.4.1/src/Commonmark/Inlines.hs    2001-09-09 
03:46:40.000000000 +0200
@@ -686,6 +686,14 @@
     opents /= closets
 delimsMatch _ _ = False
 
+-- check for balanced `[]` brackets
+bracketChunkToNumber :: Chunk a -> Int
+bracketChunkToNumber (Chunk Delim{ delimType = '[' } _ _) = 1
+bracketChunkToNumber (Chunk Delim{ delimType = ']' } _ _) = -1
+bracketChunkToNumber _ = 0
+bracketMatchedCount :: [Chunk a] -> Int
+bracketMatchedCount chunksinside = sum $ map bracketChunkToNumber chunksinside
+
 processBrackets :: IsInline a
                 => [BracketedSpec a] -> ReferenceMap -> [Chunk a] -> [Chunk a]
 processBrackets bracketedSpecs rm xs =
@@ -783,7 +791,7 @@
 
               suffixPos = incSourceColumn closePos 1
 
-          in case parse
+          in case (bracketMatchedCount chunksinside, parse
                  (withRaw
                    (do setPosition suffixPos
                        (spec, constructor) <- choice $
@@ -791,13 +799,13 @@
                            specs
                        pos <- getPosition
                        return (spec, constructor, pos)))
-                 "" suffixToks of
-                   Left _ -> -- match but no link/image
+                 "" suffixToks) of
+                   (0, Left _) -> -- match but no link/image
                          processBs bracketedSpecs
                             st{ leftCursor = moveLeft (leftCursor st)
                               , rightCursor = fixSingleQuote $
                                     moveRight (rightCursor st) }
-                   Right ((spec, constructor, newpos), desttoks) ->
+                   (0, Right ((spec, constructor, newpos), desttoks)) ->
                      let left' = case bracketedPrefix spec of
                                       Just _  -> moveLeft left
                                       Nothing -> left
@@ -854,6 +862,16 @@
                                             (chunkPos opener)
                                             $ stackBottoms st
                                 }
+                  -- Bracket matched count /= 0
+                  --
+                  -- Links § 6.3 ¶ 2 • 2
+                  -- Brackets are allowed in the link text only if (a) they are
+                  -- backslash-escaped or (b) they appear as a matched pair of
+                  -- brackets, with an open bracket [, a sequence of zero or 
more
+                  -- inlines, and a close bracket ].
+                   _ ->
+                         processBs bracketedSpecs
+                            st{ leftCursor = moveLeft left }
 
 
        (_, Just (Chunk Delim{ delimType = ']' } _ _))
@@ -954,7 +972,7 @@
 inbetween :: Monad m => Char -> Char -> ParsecT [Tok] s m [Tok]
 inbetween op cl =
   try $ between (symbol op) (symbol cl)
-     (many (pEscaped <|> noneOfToks [Symbol op, Symbol cl]))
+     (many (pEscapedSymbol <|> noneOfToks [Symbol op, Symbol cl]))
 
 pLinkLabel :: Monad m => ParsecT [Tok] s m Text
 pLinkLabel = try $ do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/commonmark-0.2.4/test/regression.md 
new/commonmark-0.2.4.1/test/regression.md
--- old/commonmark-0.2.4/test/regression.md     2001-09-09 03:46:40.000000000 
+0200
+++ new/commonmark-0.2.4.1/test/regression.md   2001-09-09 03:46:40.000000000 
+0200
@@ -219,3 +219,91 @@
 <pre><code class="language-\">x
 </code></pre>
 ````````````````````````````````
+
+Issue #119
+```````````````````````````````` example
+[[]](https://haskell.org)
+
+[[][]](https://haskell.org)
+
+[[[][]](https://haskell.org)
+
+[[][][]](https://haskell.org)
+.
+<p><a href="https://haskell.org";>[]</a></p>
+<p><a href="https://haskell.org";>[][]</a></p>
+<p>[<a href="https://haskell.org";>[][]</a></p>
+<p><a href="https://haskell.org";>[][][]</a></p>
+````````````````````````````````
+
+Issue #122
+```````````````````````````````` example
+* x
+* -
+
+
+Test
+.
+<ul>
+<li>x</li>
+<li><ul>
+<li></li>
+</ul></li>
+</ul>
+<p>Test</p>
+````````````````````````````````
+
+Issue #130
+```````````````````````````````` example
+[my-link]: https://example.com "\
+"
+[my-link]
+.
+<p><a href="https://example.com"; title="\
+">my-link</a></p>
+````````````````````````````````
+
+```````````````````````````````` example
+[my-link](https://example.com "\
+")
+.
+<p><a href="https://example.com"; title="\
+">my-link</a></p>
+````````````````````````````````
+
+
+Issue #133
+```````````````````````````````` example
+  * * xx
+
+      * yy
+
+    zz
+.
+<ul>
+<li><ul>
+<li><p>xx</p>
+<ul>
+<li>yy</li>
+</ul></li>
+</ul>
+<p>zz</p></li>
+</ul>
+````````````````````````````````
+
+```````````````````````````````` example
+  * * xx
+      * yy
+
+    zz
+.
+<ul>
+<li><ul>
+<li>xx
+<ul>
+<li>yy</li>
+</ul></li>
+</ul>
+<p>zz</p></li>
+</ul>
+````````````````````````````````

Reply via email to