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 2021-11-11 21:36:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-commonmark (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-commonmark.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-commonmark"

Thu Nov 11 21:36:20 2021 rev:10 rq:930318 version:0.2.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-commonmark/ghc-commonmark.changes    
2021-06-23 17:38:23.468484619 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-commonmark.new.1890/ghc-commonmark.changes  
2021-11-11 21:36:28.604891047 +0100
@@ -1,0 +2,9 @@
+Mon Nov  1 08:24:19 UTC 2021 - psim...@suse.com
+
+- Update commonmark to version 0.2.1.1.
+  ## 0.2.1.1
+
+    * Fix bug in `prettyShow` for `SourceRange` (#80).
+      The bug led to an infinite loop in certain cases.
+
+-------------------------------------------------------------------

Old:
----
  commonmark-0.2.1.tar.gz

New:
----
  commonmark-0.2.1.1.tar.gz

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

Other differences:
------------------
++++++ ghc-commonmark.spec ++++++
--- /var/tmp/diff_new_pack.TaNidq/_old  2021-11-11 21:36:29.004891339 +0100
+++ /var/tmp/diff_new_pack.TaNidq/_new  2021-11-11 21:36:29.004891339 +0100
@@ -19,7 +19,7 @@
 %global pkg_name commonmark
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.2.1
+Version:        0.2.1.1
 Release:        0
 Summary:        Pure Haskell commonmark parser
 License:        BSD-3-Clause

++++++ commonmark-0.2.1.tar.gz -> commonmark-0.2.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/commonmark-0.2.1/changelog.md 
new/commonmark-0.2.1.1/changelog.md
--- old/commonmark-0.2.1/changelog.md   2001-09-09 03:46:40.000000000 +0200
+++ new/commonmark-0.2.1.1/changelog.md 2021-10-23 02:01:08.000000000 +0200
@@ -1,5 +1,9 @@
 # Changelog for commonmark
 
+## 0.2.1.1
+
+  * Fix bug in `prettyShow` for `SourceRange` (#80).
+    The bug led to an infinite loop in certain cases.
 
 ## 0.2.1
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/commonmark-0.2.1/commonmark.cabal 
new/commonmark-0.2.1.1/commonmark.cabal
--- old/commonmark-0.2.1/commonmark.cabal       2001-09-09 03:46:40.000000000 
+0200
+++ new/commonmark-0.2.1.1/commonmark.cabal     2021-10-23 02:01:15.000000000 
+0200
@@ -1,6 +1,6 @@
 cabal-version:  2.2
 name:           commonmark
-version:        0.2.1
+version:        0.2.1.1
 synopsis:       Pure Haskell commonmark parser.
 description:
    This library provides the core data types and functions
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/commonmark-0.2.1/src/Commonmark/Blocks.hs 
new/commonmark-0.2.1.1/src/Commonmark/Blocks.hs
--- old/commonmark-0.2.1/src/Commonmark/Blocks.hs       2001-09-09 
03:46:40.000000000 +0200
+++ new/commonmark-0.2.1.1/src/Commonmark/Blocks.hs     2021-10-13 
01:35:36.000000000 +0200
@@ -403,6 +403,8 @@
    where
      go [] = []
      go ((!startpos1, !endpos1):(!startpos2, !endpos2):rest)
+       | startpos1 == startpos2
+       , endpos1 == endpos2   = go ((startpos1, endpos2):rest)
        | endpos1 == startpos2 = go ((startpos1, endpos2):rest)
      go (x:xs) = x : go xs
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/commonmark-0.2.1/src/Commonmark/Types.hs 
new/commonmark-0.2.1.1/src/Commonmark/Types.hs
--- old/commonmark-0.2.1/src/Commonmark/Types.hs        2001-09-09 
03:46:40.000000000 +0200
+++ new/commonmark-0.2.1.1/src/Commonmark/Types.hs      2021-10-13 
01:26:18.000000000 +0200
@@ -125,20 +125,19 @@
   ranged :: SourceRange -> a -> a
 
 prettyRange :: SourceRange -> String
-prettyRange (SourceRange []) = ""
-prettyRange (SourceRange xs@((p,_):_)) =
-  sourceName p ++ "@" ++ go (sourceName p) xs
+prettyRange (SourceRange xs) = go "" xs
   where
     go _ [] = ""
     go curname ((p1,p2):rest)
-      | sourceName p1 /= curname =
-         sourceName p1 ++ "@" ++ go (sourceName p) ((p1,p2):rest)
-      | otherwise =
+      = (if sourceName p1 /= curname
+            then sourceName p1 ++ "@"
+            else "") ++
          show (sourceLine p1) ++ ":" ++
          show (sourceColumn p1) ++ "-" ++
-         (if sourceName p2 /= curname
+         (if sourceName p2 /= sourceName p1
              then sourceName p2 ++ "@"
-             else "") ++ show (sourceLine p2) ++
+             else "") ++
+         show (sourceLine p2) ++
          ":" ++ show (sourceColumn p2) ++
          if null rest
             then ""

Reply via email to