Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-djot for openSUSE:Factory 
checked in at 2024-03-27 20:43:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-djot (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-djot.new.1905 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-djot"

Wed Mar 27 20:43:04 2024 rev:2 rq:1161571 version:0.1.1.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-djot/ghc-djot.changes        2024-03-20 
21:15:31.956599746 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-djot.new.1905/ghc-djot.changes      
2024-03-27 20:43:44.931733420 +0100
@@ -1,0 +2,18 @@
+Mon Mar 18 01:18:54 UTC 2024 - Peter Simons <[email protected]>
+
+- Update djot to version 0.1.1.3.
+  ## 0.1.1.3 -- 2024-03-17
+
+  * Ensure that tables end when we hit a blank line (#4).
+
+  * Fix parsing of table immediately after list (#4).
+
+-------------------------------------------------------------------
+Thu Mar 14 16:53:27 UTC 2024 - Peter Simons <[email protected]>
+
+- Update djot to version 0.1.1.2.
+  ## 0.1.1.2 -- 2024-03-14
+
+  * Fix bug parsing regular paragraphs after list (#4).
+
+-------------------------------------------------------------------

Old:
----
  djot-0.1.1.1.tar.gz

New:
----
  djot-0.1.1.3.tar.gz

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

Other differences:
------------------
++++++ ghc-djot.spec ++++++
--- /var/tmp/diff_new_pack.qgLIy2/_old  2024-03-27 20:43:45.683761147 +0100
+++ /var/tmp/diff_new_pack.qgLIy2/_new  2024-03-27 20:43:45.687761294 +0100
@@ -20,7 +20,7 @@
 %global pkgver %{pkg_name}-%{version}
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.1.1.1
+Version:        0.1.1.3
 Release:        0
 Summary:        Parser and renderer for djot light markup syntax
 License:        MIT

++++++ djot-0.1.1.1.tar.gz -> djot-0.1.1.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/djot-0.1.1.1/CHANGELOG.md 
new/djot-0.1.1.3/CHANGELOG.md
--- old/djot-0.1.1.1/CHANGELOG.md       2001-09-09 03:46:40.000000000 +0200
+++ new/djot-0.1.1.3/CHANGELOG.md       2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,15 @@
 # Revision history for djot
 
+## 0.1.1.3 -- 2024-03-17
+
+* Ensure that tables end when we hit a blank line (#4).
+
+* Fix parsing of table immediately after list (#4).
+
+## 0.1.1.2 -- 2024-03-14
+
+* Fix bug parsing regular paragraphs after list (#4).
+
 ## 0.1.1.1 -- 2024-03-03
 
 * Revert "Djot.Blocks: use ByteString directly in `toIdentifier` (#1)"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/djot-0.1.1.1/djot.cabal new/djot-0.1.1.3/djot.cabal
--- old/djot-0.1.1.1/djot.cabal 2001-09-09 03:46:40.000000000 +0200
+++ new/djot-0.1.1.3/djot.cabal 2001-09-09 03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
 cabal-version:      3.0
 name:               djot
-version:            0.1.1.1
+version:            0.1.1.3
 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/djot-0.1.1.1/src/Djot/Blocks.hs 
new/djot-0.1.1.3/src/Djot/Blocks.hs
--- old/djot-0.1.1.1/src/Djot/Blocks.hs 2001-09-09 03:46:40.000000000 +0200
+++ new/djot-0.1.1.3/src/Djot/Blocks.hs 2001-09-09 03:46:40.000000000 +0200
@@ -458,7 +458,12 @@
   , blockContinue = \container ->
       -- TODO: this is inefficient; we parse the inline contents
       -- twice. Find a better way.
-      (True <$ lookahead pRawTableRow)
+      (True <$
+          -- if we just parsed a blank or caption line,
+          -- we don't allow more table rows:
+          case Seq.viewr (containerText container) of
+              _ Seq.:> c | not (B8.any (=='|') (chunkBytes c)) -> mzero
+              _ -> lookahead pRawTableRow)
       <|> (True <$ followedByBlankLine)
       <|> (True <$ lookahead
                       (skipMany spaceOrTab *> asciiChar '^' *> spaceOrTab))
@@ -970,10 +975,12 @@
 
     tip <- getTip
 
-    when (blockContainsBlock (containerSpec tip) == Just Normal) $ do
-      -- add a paragraph container
-      skipMany spaceOrTab
-      blockStart paraSpec
+    case blockContainsBlock (containerSpec tip) of
+      Just bt | bt == Normal || bt == ListItem -> do
+        -- add a paragraph container
+        skipMany spaceOrTab
+        blockStart paraSpec
+      _ -> pure ()
 
   !curline <- sourceLine
   !curcolumn <- sourceColumn
@@ -1015,7 +1022,7 @@
         '`' -> blockStart codeBlockSpec
         '{' -> blockStart attrSpec
         '[' -> blockStart referenceDefinitionSpec <|> blockStart footnoteSpec
-        '|' | bt == Normal -> blockStart tableSpec
+        '|' | bt /= CaptionBlock -> blockStart tableSpec
         '^' | bt == CaptionBlock -> blockStart captionSpec
         _ -> blockStart listItemSpec
       True <$ tryContainerStarts) <|> pure False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/djot-0.1.1.1/test/regression.test 
new/djot-0.1.1.3/test/regression.test
--- old/djot-0.1.1.1/test/regression.test       2001-09-09 03:46:40.000000000 
+0200
+++ new/djot-0.1.1.3/test/regression.test       2001-09-09 03:46:40.000000000 
+0200
@@ -100,3 +100,67 @@
 </section>
 ```
 
+Issue #4
+
+```
+1. one
+2. two
+
+ok
+.
+<ol>
+<li>
+one
+</li>
+<li>
+two
+</li>
+</ol>
+<p>ok</p>
+```
+
+```
+1. one
+2. two
+
+|three|four|
+
+five
+.
+<ol>
+<li>
+one
+</li>
+<li>
+two
+</li>
+</ol>
+<table>
+<tr>
+<td>three</td>
+<td>four</td>
+</tr>
+</table>
+<p>five</p>
+```
+
+```
+|one|two|three|
+
+|four|five|six|
+.
+<table>
+<tr>
+<td>one</td>
+<td>two</td>
+<td>three</td>
+</tr>
+</table>
+<table>
+<tr>
+<td>four</td>
+<td>five</td>
+<td>six</td>
+</tr>
+</table>
+```

Reply via email to