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 2026-06-10 15:59:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-djot (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-djot.new.2375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-djot"

Wed Jun 10 15:59:28 2026 rev:8 rq:1358360 version:0.1.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-djot/ghc-djot.changes        2025-12-05 
16:56:15.303427732 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-djot.new.2375/ghc-djot.changes      
2026-06-10 16:00:35.419209553 +0200
@@ -1,0 +2,34 @@
+Tue Mar 17 15:03:34 UTC 2026 - Peter Simons <[email protected]>
+
+- Update djot to version 0.1.4.
+  ## 0.1.4 -- 2026-03-17
+
+    * Ensure that delims aren't matched in link destinations (#15).
+
+    * Change behavior for empty link label. To match djot.js; we now
+      take the string content (rather than raw source) of the link
+      description, so e.g. emphasis is ignored.
+
+    * Html renderer: don't emit empty href for undefined ref link.
+      This conforms to djot.js behavior, expected in tests.
+
+    * Update links_and_images test from reference impl: djot.js.
+
+  ## 0.1.3 -- 2026-02-01
+
+  * Fix nested sections bug when sections contain only lists (#14).
+    When a section contained only list elements (no paragraphs),
+    subsequent headings at the same level were incorrectly nested
+    inside the previous section instead of being siblings.
+
+  * CLI: add `--version` option (#13).
+
+  * Export version from Djot module. [API change]
+
+  * Remove some INLINE pragmas. These don't make a measurable
+    difference in benchmarks.
+
+  * There can't be a blank line btw block attrs and block.
+    Cf. https://github.com/jgm/djot.js/issues/118
+
+-------------------------------------------------------------------

Old:
----
  djot-0.1.2.4.tar.gz

New:
----
  djot-0.1.4.tar.gz

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

Other differences:
------------------
++++++ ghc-djot.spec ++++++
--- /var/tmp/diff_new_pack.aHT7JD/_old  2026-06-10 16:00:36.627259615 +0200
+++ /var/tmp/diff_new_pack.aHT7JD/_new  2026-06-10 16:00:36.627259615 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-djot
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -20,7 +20,7 @@
 %global pkgver %{pkg_name}-%{version}
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.1.2.4
+Version:        0.1.4
 Release:        0
 Summary:        Parser and renderer for djot light markup syntax
 License:        MIT

++++++ djot-0.1.2.4.tar.gz -> djot-0.1.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/djot-0.1.2.4/CHANGELOG.md new/djot-0.1.4/CHANGELOG.md
--- old/djot-0.1.2.4/CHANGELOG.md       2001-09-09 03:46:40.000000000 +0200
+++ new/djot-0.1.4/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,35 @@
 # Revision history for djot
 
+## 0.1.4 -- 2026-03-17
+
+  * Ensure that delims aren't matched in link destinations (#15).
+
+  * Change behavior for empty link label. To match djot.js; we now
+    take the string content (rather than raw source) of the link
+    description, so e.g. emphasis is ignored.
+
+  * Html renderer: don't emit empty href for undefined ref link.
+    This conforms to djot.js behavior, expected in tests.
+
+  * Update links_and_images test from reference impl: djot.js.
+
+## 0.1.3 -- 2026-02-01
+
+* Fix nested sections bug when sections contain only lists (#14).
+  When a section contained only list elements (no paragraphs),
+  subsequent headings at the same level were incorrectly nested
+  inside the previous section instead of being siblings.
+
+* CLI: add `--version` option (#13).
+
+* Export version from Djot module. [API change]
+
+* Remove some INLINE pragmas. These don't make a measurable
+  difference in benchmarks.
+
+* There can't be a blank line btw block attrs and block.
+  Cf. https://github.com/jgm/djot.js/issues/118
+
 ## 0.1.2.4 -- 2025-11-30
 
 * Ensure that `'95--'96` doesn't get parsed as singlequoted.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/djot-0.1.2.4/app/Main.hs new/djot-0.1.4/app/Main.hs
--- old/djot-0.1.2.4/app/Main.hs        2001-09-09 03:46:40.000000000 +0200
+++ new/djot-0.1.4/app/Main.hs  2001-09-09 03:46:40.000000000 +0200
@@ -5,13 +5,14 @@
 import qualified Data.ByteString as B
 import Data.ByteString.Builder (hPutBuilder)
 import Djot ( ParseOptions(..), RenderOptions(..), SourcePosOption(..),
-              parseDoc, renderHtml, renderDjot )
+              parseDoc, renderHtml, renderDjot, version )
 import System.Environment (getArgs)
 import System.IO (stderr, stdout, hPutStrLn)
 import System.Exit ( ExitCode(ExitFailure), exitWith, exitSuccess )
 import Text.DocLayout (render)
 import Text.Read (readMaybe)
 import qualified Data.Text.IO as TIO
+import Data.Version (showVersion)
 
 data OutputFormat = Html | Djot | Ast
   deriving (Eq, Show)
@@ -60,8 +61,12 @@
      putStrLn "  --wrap auto|preserve*|none"
      putStrLn "  --columns NUMBER"
      putStrLn "  --sourcepos none*|block|all"
+     putStrLn "  --version"
      putStrLn "  --help"
      exitSuccess
+   go _opts ("--version" : _) = do
+     putStrLn $ "djot " <> showVersion version
+     exitSuccess
    go opts (xs@('-':_) : as) =
      case break (== '=') xs of  -- support e.g. '--columns=33'
        (ys, '=':zs) -> go opts (ys : zs : as)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/djot-0.1.2.4/djot.cabal new/djot-0.1.4/djot.cabal
--- old/djot-0.1.2.4/djot.cabal 2001-09-09 03:46:40.000000000 +0200
+++ new/djot-0.1.4/djot.cabal   2001-09-09 03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
 cabal-version:      3.0
 name:               djot
-version:            0.1.2.4
+version:            0.1.4
 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
@@ -44,6 +44,8 @@
                       Djot.Blocks
                       Djot.Html
                       Djot.Djot
+    other-modules:    Paths_djot
+    autogen-modules:  Paths_djot
     ghc-options: -Wall -O2
 
 executable djoths
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/djot-0.1.2.4/src/Djot/Blocks.hs 
new/djot-0.1.4/src/Djot/Blocks.hs
--- old/djot-0.1.2.4/src/Djot/Blocks.hs 2001-09-09 03:46:40.000000000 +0200
+++ new/djot-0.1.4/src/Djot/Blocks.hs   2001-09-09 03:46:40.000000000 +0200
@@ -43,6 +43,7 @@
                         , psReferenceMap = mempty
                         , psAutoReferenceMap = mempty
                         , psNoteMap = mempty
+                        , psLastAttributeLine = 0
                         , psAttributes = mempty
                         , psAttrParserState = Nothing
                         , psIds = mempty
@@ -748,7 +749,9 @@
       case parseAttributes Nothing bs of
         Done (attr, off)
           | B8.all isWs (B8.drop off bs) -> do
-             updateState $ \st -> st{ psAttributes = psAttributes st <> attr }
+             linenum <- sourceLine
+             updateState $ \st -> st{ psAttributes = psAttributes st <> attr
+                                    , psLastAttributeLine = linenum - 1 }
              pure container
           | otherwise -> do
              ils <- parseTextLines container
@@ -914,6 +917,7 @@
   , psReferenceMap :: ReferenceMap
   , psAutoReferenceMap :: ReferenceMap
   , psNoteMap :: NoteMap
+  , psLastAttributeLine :: Int
   , psAttributes :: Attr
   , psAttrParserState :: Maybe AttrParserState
   , psIds :: Set ByteString
@@ -956,7 +960,6 @@
                           replicateM_ (length (c:cs)) closeCurrentContainer
 
 
-{-# INLINE processLines #-}
 processLines :: P ()
 processLines = do
   -- check continuations for open containers and close any that don't match
@@ -1037,7 +1040,6 @@
     _ :| [] -> closeCurrentContainer >> finalize <$> getTip
     _ -> closeCurrentContainer >> finalizeDocument
 
-{-# INLINE closeCurrentContainer #-}
 -- | Close container and add to parent container.
 closeCurrentContainer :: P ()
 closeCurrentContainer = do
@@ -1063,16 +1065,17 @@
                      c{ containerEndLine = psLastLine st
                       , containerEndColumn = psLastColumnPrevLine st } :| [] }
 
-{-# INLINE modifyContainers #-}
 modifyContainers :: (NonEmpty Container -> NonEmpty Container) -> P ()
 modifyContainers f =
   updateState $ \st -> st{ psContainerStack = f (psContainerStack st) }
 
-{-# INLINE addContainer #-}
 addContainer :: BlockSpec -> Int -> ContainerData -> P ()
 addContainer bspec curcol bdata = do
   curline <- sourceLine
-  attr <- psAttributes <$> getState
+  lastAttrLine <- psLastAttributeLine <$> getState
+  attr <- if curline == lastAttrLine + 1
+             then psAttributes <$> getState
+             else pure mempty  -- ignore attributes with intervening blank line
   opts <- psParseOptions <$> getState
   let newcontainer = emptyContainer { containerSpec = bspec
                                     , containerStartLine = curline
@@ -1121,7 +1124,6 @@
   when (curindent < indent) $
      optional_ (spaceOrTab *> gobbleSpaceToIndent indent)
 
-{-# INLINE getTip #-}
 -- Get tip of container stack.
 getTip :: P Container
 getTip = NonEmpty.head . psContainerStack <$> getState
@@ -1130,10 +1132,13 @@
 closeContainingSections lev = do
   tip <- getTip
   case containerData tip of
-    SectionData lev' _ | lev' >= lev ->
-      closeCurrentContainer >>
-      closeContainingSections lev
-    _ -> pure ()
+    SectionData lev' _
+      | lev' >= lev -> closeCurrentContainer >> closeContainingSections lev
+      | otherwise -> pure ()  -- section with lower level, stop
+    _ | blockContainsBlock (containerSpec tip) /= Just Normal ->
+        -- close containers that can't directly contain sections (e.g., List)
+        closeCurrentContainer >> closeContainingSections lev
+    _ -> pure ()  -- container can hold sections, stop here
 
 -- TODO avoid detour through String
 toIdentifier :: ByteString -> ByteString
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/djot-0.1.2.4/src/Djot/Html.hs 
new/djot-0.1.4/src/Djot/Html.hs
--- old/djot-0.1.2.4/src/Djot/Html.hs   2001-09-09 03:46:40.000000000 +0200
+++ new/djot-0.1.4/src/Djot/Html.hs     2001-09-09 03:46:40.000000000 +0200
@@ -273,7 +273,7 @@
                    Reference label -> do
                      rm <- gets referenceMap
                      case lookupReference label rm of
-                       Nothing -> pure $ Attr [("href", "")]
+                       Nothing -> pure mempty
                        Just (u, Attr as) -> pure $ Attr (("href",u):as)
         inTags "a" pos (attr' <> attr) <$> toBuilder ils
       Image ils target -> do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/djot-0.1.2.4/src/Djot/Inlines.hs 
new/djot-0.1.4/src/Djot/Inlines.hs
--- old/djot-0.1.2.4/src/Djot/Inlines.hs        2001-09-09 03:46:40.000000000 
+0200
+++ new/djot-0.1.4/src/Djot/Inlines.hs  2001-09-09 03:46:40.000000000 +0200
@@ -360,12 +360,12 @@
 pImage :: P Inlines
 pImage = do
   asciiChar '!'
-  (res, raw) <- withByteString pBracketed
+  res <- pBracketed
   case res of
     Left ils -> pure (str "!" <> ils)
     Right ils ->
             ((str "!" <>) <$> pAddAttributes (span_ ils))
-        <|> (image ils <$> (pDestination <|> pReference raw))
+        <|> (image ils <$> (pDestination <|> pReference ils))
         <|> pure (str "![" <> ils <> str "]")
 
 pAutolink :: P Inlines
@@ -381,20 +381,23 @@
 
 pLinkOrSpan :: P Inlines
 pLinkOrSpan = do
-  (res, raw) <- withByteString pBracketed
+  res <- pBracketed
   case res of
     Left ils -> pure ils
     Right ils ->
             (span_ ils <$ lookahead (asciiChar '{'))
-        <|> (link ils <$> (pDestination <|> pReference raw))
+        <|> (link ils <$> (pDestination <|> pReference ils))
         <|> pure (str "[" <> ils <> str "]")
 
 -- We allow balanced pairs of parens inside.
 pDestination :: P Target
 pDestination = do
+  oldActiveDelims <- activeDelims <$> getState
+  updateState $ \st -> st{ activeDelims = mempty }
   asciiChar '('
   res <- byteStringOf $ pInBalancedParens 0
   asciiChar ')'
+  updateState $ \st -> st{ activeDelims = oldActiveDelims }
   pure $ Direct (snd (handleEscapesAndNewlines res))
  where
   handleEscapesAndNewlines = B8.foldl' go (False, mempty)
@@ -416,16 +419,16 @@
             <|> ((nestlevel - 1) <$ asciiChar ')')
        pInBalancedParens lev
 
-pReference :: ByteString -> P Target
-pReference rawDescription = do
+pReference :: Inlines -> P Target
+pReference description = do
   asciiChar '['
   bs <- byteStringOf $ pAtMost 400 $ skipSatisfyByte
            (\c -> c /= '[' && c /= ']')
   asciiChar ']'
   let label = normalizeLabel $
               if B.null bs
-                 then B.drop 1 $ B.dropEnd 1
-                               $ B8.filter (/= '\n') rawDescription
+                 then B8.filter (/= '\n')
+                      $ inlinesToByteString description
                  else bs
   pure $ Reference label
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/djot-0.1.2.4/src/Djot.hs new/djot-0.1.4/src/Djot.hs
--- old/djot-0.1.2.4/src/Djot.hs        2001-09-09 03:46:40.000000000 +0200
+++ new/djot-0.1.4/src/Djot.hs  2001-09-09 03:46:40.000000000 +0200
@@ -7,6 +7,7 @@
   , SourcePosOption(..)
   , RenderOptions(..)
   , module Djot.AST
+  , version
   )
 where
 
@@ -15,3 +16,4 @@
 import Djot.Html (renderHtml)
 import Djot.Djot (renderDjot)
 import Djot.AST
+import Paths_djot (version)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/djot-0.1.2.4/test/links_and_images.test 
new/djot-0.1.4/test/links_and_images.test
--- old/djot-0.1.2.4/test/links_and_images.test 2001-09-09 03:46:40.000000000 
+0200
+++ new/djot-0.1.4/test/links_and_images.test   2001-09-09 03:46:40.000000000 
+0200
@@ -87,7 +87,7 @@
 [link][a and
 b]
 .
-<p><a href="">link</a></p>
+<p><a>link</a></p>
 ```
 
 Reference definitions can't have line breaks in the key:
@@ -99,7 +99,7 @@
 [a and
 b]: url
 .
-<p><a href="">link</a></p>
+<p><a>link</a></p>
 <p>[a and
 b]: url</p>
 ```
@@ -111,7 +111,7 @@
 
 [link]: /url
 .
-<p><a href="">Link</a></p>
+<p><a>Link</a></p>
 ```
 
 Attributes on reference definitions get transferred to
@@ -140,7 +140,7 @@
 ```
 [link _and_ link][]
 
-[link _and_ link]: url
+[link and link]: url
 .
 <p><a href="url">link <em>and</em> link</a></p>
 ```
@@ -174,21 +174,34 @@
 <p><a href="hello *ab*">closed</a></p>
 ```
 
-Here the strong takes precedence over the link because it
-starts first:
+Here the link takes precedence because the star inside the
+destination is protected from closing emphasis:
 ```
 *[closed](hello*)
 .
-<p><strong>[closed](hello</strong>)</p>
+<p>*<a href="hello*">closed</a></p>
 ```
 
-Avoid this with a backslash escape:
+This also works with a backslash escape:
 ```
 *[closed](hello\*)
 .
 <p>*<a href="hello*">closed</a></p>
 ```
 
+Underscores in link destinations don't interfere with emphasis:
+```
+_[link](http://example.com?foo_bar=1), more text_
+.
+<p><em><a href="http://example.com?foo_bar=1";>link</a>, more text</em></p>
+```
+
+```
+_hello [link](a_b) world_
+.
+<p><em>hello <a href="a_b">link</a> world</em></p>
+```
+
 Link in link?
 ```
 [[foo](bar)](baz)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/djot-0.1.2.4/test/regression.test 
new/djot-0.1.4/test/regression.test
--- old/djot-0.1.2.4/test/regression.test       2001-09-09 03:46:40.000000000 
+0200
+++ new/djot-0.1.4/test/regression.test 2001-09-09 03:46:40.000000000 +0200
@@ -215,3 +215,43 @@
 .
 <p>I like the Lemon Jelly album titled ’64–’95.</p>
 ```
+
+https://github.com/jgm/djot.js/issues/118
+
+```
+{#ident
+  .class}
+
+Para
+.
+<p>Para</p>
+```
+
+Issue jgm/djoths#14 - nested sections with list-only content:
+
+```
+## Section 1
+
+- item
+
+## Section 2
+
+- item
+.
+<section id="Section-1">
+<h2>Section 1</h2>
+<ul>
+<li>
+item
+</li>
+</ul>
+</section>
+<section id="Section-2">
+<h2>Section 2</h2>
+<ul>
+<li>
+item
+</li>
+</ul>
+</section>
+```

Reply via email to