Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-jira-wiki-markup for
openSUSE:Factory checked in at 2021-03-24 16:11:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-jira-wiki-markup (Old)
and /work/SRC/openSUSE:Factory/.ghc-jira-wiki-markup.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-jira-wiki-markup"
Wed Mar 24 16:11:58 2021 rev:8 rq:880426 version:1.3.4
Changes:
--------
---
/work/SRC/openSUSE:Factory/ghc-jira-wiki-markup/ghc-jira-wiki-markup.changes
2021-03-10 08:57:11.082884611 +0100
+++
/work/SRC/openSUSE:Factory/.ghc-jira-wiki-markup.new.2401/ghc-jira-wiki-markup.changes
2021-03-24 16:11:59.519878554 +0100
@@ -1,0 +2,19 @@
+Sun Mar 14 22:19:01 UTC 2021 - [email protected]
+
+- Update jira-wiki-markup to version 1.3.4.
+ 1.3.4
+ -----
+
+ Released 2021-03-13.
+
+ * Fixed parsing of autolinks (i.e., of bare URLs in the text).
+ Previously an autolink would take up the rest of a line, as
+ spaces were allowed characters in these items.
+
+ * Emoji character sequences no longer cause parsing failures. This
+ was due to missing backtracking when emoji parsing fails.
+
+ * Block quotes are only rendered as `bq.` if they do not contain a
+ linebreak.
+
+-------------------------------------------------------------------
Old:
----
jira-wiki-markup-1.3.3.tar.gz
New:
----
jira-wiki-markup-1.3.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-jira-wiki-markup.spec ++++++
--- /var/tmp/diff_new_pack.hKmvgK/_old 2021-03-24 16:12:00.111879176 +0100
+++ /var/tmp/diff_new_pack.hKmvgK/_new 2021-03-24 16:12:00.115879180 +0100
@@ -19,7 +19,7 @@
%global pkg_name jira-wiki-markup
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 1.3.3
+Version: 1.3.4
Release: 0
Summary: Handle Jira wiki markup
License: MIT
++++++ jira-wiki-markup-1.3.3.tar.gz -> jira-wiki-markup-1.3.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jira-wiki-markup-1.3.3/CHANGELOG.md
new/jira-wiki-markup-1.3.4/CHANGELOG.md
--- old/jira-wiki-markup-1.3.3/CHANGELOG.md 2001-09-09 03:46:40.000000000
+0200
+++ new/jira-wiki-markup-1.3.4/CHANGELOG.md 2001-09-09 03:46:40.000000000
+0200
@@ -4,6 +4,21 @@
`jira-wiki-markup` uses [PVP Versioning][1].
The changelog is available [on GitHub][2].
+1.3.4
+-----
+
+Released 2021-03-13.
+
+* Fixed parsing of autolinks (i.e., of bare URLs in the text).
+ Previously an autolink would take up the rest of a line, as
+ spaces were allowed characters in these items.
+
+* Emoji character sequences no longer cause parsing failures. This
+ was due to missing backtracking when emoji parsing fails.
+
+* Block quotes are only rendered as `bq.` if they do not contain a
+ linebreak.
+
1.3.3
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jira-wiki-markup-1.3.3/jira-wiki-markup.cabal
new/jira-wiki-markup-1.3.4/jira-wiki-markup.cabal
--- old/jira-wiki-markup-1.3.3/jira-wiki-markup.cabal 2001-09-09
03:46:40.000000000 +0200
+++ new/jira-wiki-markup-1.3.4/jira-wiki-markup.cabal 2001-09-09
03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
cabal-version: 2.0
name: jira-wiki-markup
-version: 1.3.3
+version: 1.3.4
synopsis: Handle Jira wiki markup
description: Parse jira wiki text into an abstract syntax tree for easy
transformation to other formats.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jira-wiki-markup-1.3.3/src/Text/Jira/Parser/Block.hs
new/jira-wiki-markup-1.3.4/src/Text/Jira/Parser/Block.hs
--- old/jira-wiki-markup-1.3.3/src/Text/Jira/Parser/Block.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/jira-wiki-markup-1.3.4/src/Text/Jira/Parser/Block.hs 2001-09-09
03:46:40.000000000 +0200
@@ -170,8 +170,10 @@
(string "bq." *> skipMany (char ' ') *>
inline `manyTill` (void newline <|> eof))
multiLineBq = BlockQuote <$>
- (string "{quote}" *> optional blankline *>
- block `manyTill` try (string "{quote}"))
+ (string "{quote}"
+ *> optional blankline
+ *> skipMany (char ' ')
+ *> block `manyTill` try (string "{quote}"))
-- | Parses four consecutive hyphens as @'HorizontalRule'@.
horizontalRule :: JiraParser Block
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jira-wiki-markup-1.3.3/src/Text/Jira/Parser/Inline.hs
new/jira-wiki-markup-1.3.4/src/Text/Jira/Parser/Inline.hs
--- old/jira-wiki-markup-1.3.3/src/Text/Jira/Parser/Inline.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/jira-wiki-markup-1.3.4/src/Text/Jira/Parser/Inline.hs 2001-09-09
03:46:40.000000000 +0200
@@ -110,7 +110,7 @@
-- | Parses textual representation of an icon into an @'Emoji'@ element.
emoji :: JiraParser Inline
-emoji = Emoji <$> icon <* notFollowedBy' letter <?> "emoji"
+emoji = try (Emoji <$> icon <* notFollowedBy' letter <?> "emoji")
-- | Parses ASCII representation of en-dash or em-dash.
dash :: JiraParser Inline
@@ -171,7 +171,7 @@
(alias, sep) <- option ([], '|') . try $ (,) <$> many inline <*> oneOf "^|"
(linkType, linkURL) <- if sep == '|'
then (Email,) <$> email <|>
- (External,) <$> url <|>
+ (External,) <$> url False <|>
(External,) <$> anchorLink <|>
(User,) <$> userLink
else (Attachment,) . URL . pack <$> many1 urlChar
@@ -182,16 +182,17 @@
autolink :: JiraParser Inline
autolink = do
guard . not . stateInLink =<< getState
- AutoLink <$> (email' <|> url) <?> "email or other URL"
+ AutoLink <$> (email' <|> url True) <?> "email or other URL"
where email' = (\(URL e) -> URL ("mailto:" <> e)) <$> email
--- | Parse a URL with scheme @file@, @ftp@, @http@, @https@, @irc@, @nntp@, or
--- @news@.
-url :: JiraParser URL
-url = try $ do
+-- | Parse a URL with scheme @file@, @ftp@, @http@, @https@, @irc@,
+-- @nntp@, or @news@.
+url :: Bool -> JiraParser URL
+url isAutoLink = try $ do
+ let urlChar' = if isAutoLink then urlChar else urlChar <|> char ' '
urlScheme <- scheme
sep <- pack <$> string "://"
- rest <- pack <$> many urlChar
+ rest <- pack <$> many urlChar'
return $ URL (urlScheme `append` sep `append` rest)
where
scheme = do
@@ -217,8 +218,10 @@
-- | Parses a character which is allowed in URLs
urlChar :: JiraParser Char
-urlChar = satisfy $ \c ->
- c `notElem` ("|]" :: String) && ord c >= 32 && ord c <= 127
+urlChar = satisfy $ \case
+ ']' -> False -- "]"
+ '|' -> False -- "|"
+ x -> ord x > 32 && ord x <= 126 -- excludes space
--
-- Color
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jira-wiki-markup-1.3.3/src/Text/Jira/Printer.hs
new/jira-wiki-markup-1.3.4/src/Text/Jira/Printer.hs
--- old/jira-wiki-markup-1.3.3/src/Text/Jira/Printer.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/jira-wiki-markup-1.3.4/src/Text/Jira/Printer.hs 2001-09-09
03:46:40.000000000 +0200
@@ -141,11 +141,12 @@
, blks
, "{color}"
]
- BlockQuote [Para xs] -> return $ "bq. " <> prettyInlines xs
+ BlockQuote [Para xs] | Linebreak `notElem` xs
+ -> return $ "bq. " <> prettyInlines xs
BlockQuote blocks -> renderBlocks blocks >>= \blks -> return $
T.concat
[ "{quote}\n"
, blks
- , "\n{quote}"]
+ , "{quote}"]
Header lvl inlines -> return $ T.concat
[ "h", T.pack (show lvl), ". "
, prettyInlines inlines
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jira-wiki-markup-1.3.3/test/Text/Jira/Parser/BlockTests.hs
new/jira-wiki-markup-1.3.4/test/Text/Jira/Parser/BlockTests.hs
--- old/jira-wiki-markup-1.3.3/test/Text/Jira/Parser/BlockTests.hs
2001-09-09 03:46:40.000000000 +0200
+++ new/jira-wiki-markup-1.3.4/test/Text/Jira/Parser/BlockTests.hs
2001-09-09 03:46:40.000000000 +0200
@@ -354,6 +354,10 @@
parseJira blockQuote "bq.another test\n" @?=
Right (BlockQuote [Para [Str "another", Space, Str "test"]])
+ , testCase "multiline block quote" $
+ parseJira blockQuote "{quote}\n quote\n me\n{quote}\n" @?=
+ Right (BlockQuote [Para [Str "quote", Linebreak, Str "me"]])
+
, testCase "multi-paragraph block quote" $
parseJira blockQuote "{quote}\npara1\n\npara2\n{quote}\n" @?=
Right (BlockQuote [ Para [Str "para1"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jira-wiki-markup-1.3.3/test/Text/Jira/Parser/InlineTests.hs
new/jira-wiki-markup-1.3.4/test/Text/Jira/Parser/InlineTests.hs
--- old/jira-wiki-markup-1.3.3/test/Text/Jira/Parser/InlineTests.hs
2001-09-09 03:46:40.000000000 +0200
+++ new/jira-wiki-markup-1.3.4/test/Text/Jira/Parser/InlineTests.hs
2001-09-09 03:46:40.000000000 +0200
@@ -226,6 +226,10 @@
parseJira autolink "https://example.org/foo" @?=
Right (AutoLink (URL "https://example.org/foo"))
+ , testCase "link followed by text" $
+ parseJira autolink "file:///etc/fstab has passwords" @?=
+ Right (AutoLink (URL "file:///etc/fstab"))
+
, testCase "email" $
parseJira autolink "mailto:[email protected]" @?=
Right (AutoLink (URL "mailto:[email protected]"))
@@ -363,6 +367,10 @@
Right [ Str "verdict", SpecialChar ':', Space
, Emoji IconSmiling, Space, Str "funny"]
+ , testCase "smiley within word" $
+ parseJira (normalizeInlines <$> many1 inline) "C:DE" @?=
+ Right [ Str "C", SpecialChar ':', Str "DE" ]
+
, testCase "dash with spaces" $
parseJira (many1 inline) "one -- two" @?=
Right [Str "one", Space, Str "???", Space, Str "two"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jira-wiki-markup-1.3.3/test/Text/Jira/PrinterTests.hs
new/jira-wiki-markup-1.3.4/test/Text/Jira/PrinterTests.hs
--- old/jira-wiki-markup-1.3.3/test/Text/Jira/PrinterTests.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/jira-wiki-markup-1.3.4/test/Text/Jira/PrinterTests.hs 2001-09-09
03:46:40.000000000 +0200
@@ -108,6 +108,32 @@
let list = List Enumeration [[Para [Str "boring"]]]
para = Para [Str "after", Space, Str "table"]
in prettyBlocks [list, para] @?= "# boring\n\nafter table\n"
+
+ , testGroup "block quote"
+ [ testCase "single-line block quote" $
+ let bq = BlockQuote [Para
+ [Str "Errare", Space, Str "humanum", Space, Str "est."]
+ ]
+ in prettyBlocks [bq] @?= "bq. Errare humanum est."
+
+ , testCase "multi-line block quote" $
+ let bq = BlockQuote [Para [Str "Show", Linebreak, Str "me"]]
+ in prettyBlocks [bq] @?= "{quote}\nShow\nme\n{quote}"
+
+ , testCase "multi-paragraph block quote" $
+ let bq = BlockQuote [Para [Str "Only."], Para [Str "You."]]
+ in prettyBlocks [bq] @?= "{quote}\nOnly.\n\nYou.\n{quote}"
+ ]
+
+ , testGroup "panel"
+ [ testCase "simple panel" $
+ let panel = Panel [] [Para [Str "Contents!"]]
+ in prettyBlocks [panel] @?= "{panel}\nContents!\n{panel}"
+
+ , testCase "panel with title" $
+ let panel = Panel [Parameter "title" "Gimme"] [Para [Str "Contents!"]]
+ in prettyBlocks [panel] @?= "{panel:title=Gimme}\nContents!\n{panel}"
+ ]
]
, testGroup "isolated inline"