Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-commonmark-extensions for 
openSUSE:Factory checked in at 2022-10-13 15:44:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-commonmark-extensions (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-commonmark-extensions.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-commonmark-extensions"

Thu Oct 13 15:44:05 2022 rev:9 rq:1009704 version:0.2.3.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-commonmark-extensions/ghc-commonmark-extensions.changes
      2022-08-01 21:29:46.629549432 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-commonmark-extensions.new.2275/ghc-commonmark-extensions.changes
    2022-10-13 15:44:36.791026995 +0200
@@ -1,0 +2,10 @@
+Thu Sep 29 04:40:58 UTC 2022 - Peter Simons <[email protected]>
+
+- Update commonmark-extensions to version 0.2.3.3.
+  ## 0.2.3.3
+
+    - Fix definition_lists extension (#96). We were not properly consuming
+      indentation in definitions, which caused problems when the definitions
+      themselves contained lists.
+
+-------------------------------------------------------------------

Old:
----
  commonmark-extensions-0.2.3.2.tar.gz

New:
----
  commonmark-extensions-0.2.3.3.tar.gz

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

Other differences:
------------------
++++++ ghc-commonmark-extensions.spec ++++++
--- /var/tmp/diff_new_pack.7cbZul/_old  2022-10-13 15:44:37.295027978 +0200
+++ /var/tmp/diff_new_pack.7cbZul/_new  2022-10-13 15:44:37.299027987 +0200
@@ -19,7 +19,7 @@
 %global pkg_name commonmark-extensions
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.2.3.2
+Version:        0.2.3.3
 Release:        0
 Summary:        Pure Haskell commonmark parser
 License:        BSD-3-Clause

++++++ commonmark-extensions-0.2.3.2.tar.gz -> 
commonmark-extensions-0.2.3.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/commonmark-extensions-0.2.3.2/changelog.md 
new/commonmark-extensions-0.2.3.3/changelog.md
--- old/commonmark-extensions-0.2.3.2/changelog.md      2022-05-31 
19:54:59.000000000 +0200
+++ new/commonmark-extensions-0.2.3.3/changelog.md      2001-09-09 
03:46:40.000000000 +0200
@@ -1,5 +1,12 @@
 # Changelog for commonmark-extensions
 
+## 0.2.3.3
+
+  - Fix definition_lists extension (#96). We were not properly consuming
+    indentation in definitions, which caused problems when the definitions
+    themselves contained lists.
+
+
 ## 0.2.3.2
 
 - Update lower version bounds for commonmark (#93, David
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/commonmark-extensions-0.2.3.2/commonmark-extensions.cabal 
new/commonmark-extensions-0.2.3.3/commonmark-extensions.cabal
--- old/commonmark-extensions-0.2.3.2/commonmark-extensions.cabal       
2022-05-31 19:53:56.000000000 +0200
+++ new/commonmark-extensions-0.2.3.3/commonmark-extensions.cabal       
2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
 name:           commonmark-extensions
-version:        0.2.3.2
+version:        0.2.3.3
 synopsis:       Pure Haskell commonmark parser.
 description:
    This library provides some useful extensions to core commonmark
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/commonmark-extensions-0.2.3.2/src/Commonmark/Extensions/DefinitionList.hs 
new/commonmark-extensions-0.2.3.3/src/Commonmark/Extensions/DefinitionList.hs
--- 
old/commonmark-extensions-0.2.3.2/src/Commonmark/Extensions/DefinitionList.hs   
    2022-01-12 04:38:14.000000000 +0100
+++ 
new/commonmark-extensions-0.2.3.3/src/Commonmark/Extensions/DefinitionList.hs   
    2001-09-09 03:46:40.000000000 +0200
@@ -81,21 +81,27 @@
      }
 
 
-
 definitionListDefinitionBlockSpec ::
    (Monad m, IsBlock il bl, IsInline il, HasDefinitionList il bl)
    => BlockSpec m il bl
 definitionListDefinitionBlockSpec = BlockSpec
      { blockType           = "DefinitionListDefinition"
      , blockStart          = try $ do
-         n <- gobbleUpToSpaces 3
+         initcol <- sourceColumn <$> getPosition
+         gobbleUpToSpaces 3
          pos <- getPosition
          symbol ':' <|> symbol '~'
-         gobbleSpaces (min 1 (3 - n))
+         try (gobbleUpToSpaces 4 <* notFollowedBy whitespace)
+           <|> gobbleSpaces 1
+           <|> 1 <$ lookAhead lineEnd
+         finalcol <- sourceColumn <$> getPosition
          (Node bdata children : rest) <- nodeStack <$> getState
+         let definitionIndent :: Int
+             definitionIndent = finalcol - initcol
          let defnode = Node (defBlockData
                               definitionListDefinitionBlockSpec){
-                                  blockStartPos = [pos] } []
+                                  blockStartPos = [pos],
+                                  blockData = toDyn definitionIndent } []
          if blockType (blockSpec bdata) == "DefinitionListItem"
             then addNodeToStack defnode
             else do
@@ -153,9 +159,10 @@
      , blockCanContain     = const True
      , blockContainsLines  = False
      , blockParagraph      = False
-     , blockContinue       = \node -> do
+     , blockContinue       = \node@(Node ndata _cs) -> do
          pos <- getPosition
-         gobbleSpaces 4 <|> 0 <$ lookAhead blankLine
+         let definitionIndent = fromDyn (blockData ndata) 0
+         gobbleSpaces definitionIndent <|> 0 <$ lookAhead blankLine
          return $! (pos, node)
      , blockConstructor    = fmap mconcat . renderChildren
      , blockFinalize       = defaultFinalizer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/commonmark-extensions-0.2.3.2/test/definition_lists.md 
new/commonmark-extensions-0.2.3.3/test/definition_lists.md
--- old/commonmark-extensions-0.2.3.2/test/definition_lists.md  2020-04-05 
01:13:40.000000000 +0200
+++ new/commonmark-extensions-0.2.3.3/test/definition_lists.md  2001-09-09 
03:46:40.000000000 +0200
@@ -126,6 +126,26 @@
 </dl>
 ````````````````````````````````
 
+Nested lists:
+
+```````````````````````````````` example
+term
+
+:   1. Para one
+
+       Para two
+.
+<dl>
+<dt>term</dt>
+<dd>
+<ol>
+<li><p>Para one</p>
+<p>Para two</p></li>
+</ol>
+</dd>
+</dl>
+````````````````````````````````
+
 Multiple definitions, tight:
 
 ```````````````````````````````` example

Reply via email to