Jira reader: support colored inline text, indented lists
* Support for colored inlines has been added. * Lists are now allowed to be indented; i.e., lists are still recognized if list markers are preceded by spaces. Closes: #6183, #6184
This commit is contained in:
parent
91f2bcfe73
commit
7eb9914841
4 changed files with 8 additions and 2 deletions
|
@ -411,7 +411,7 @@ library
|
|||
blaze-html >= 0.9 && < 0.10,
|
||||
blaze-markup >= 0.8 && < 0.9,
|
||||
vector >= 0.10 && < 0.13,
|
||||
jira-wiki-markup >= 1.0 && < 1.1,
|
||||
jira-wiki-markup >= 1.1 && < 1.2,
|
||||
hslua >= 1.0.1 && < 1.1,
|
||||
hslua-module-system >= 0.2 && < 0.3,
|
||||
hslua-module-text >= 0.2 && < 0.3,
|
||||
|
|
|
@ -121,6 +121,8 @@ jiraToPandocInlines :: Jira.Inline -> Inlines
|
|||
jiraToPandocInlines = \case
|
||||
Jira.Anchor t -> spanWith (t, [], []) mempty
|
||||
Jira.AutoLink url -> link (Jira.fromURL url) "" (str (Jira.fromURL url))
|
||||
Jira.ColorInline c ils -> spanWith ("", [], [("color", colorName c)]) $
|
||||
fromInlines ils
|
||||
Jira.Emoji icon -> str . iconUnicode $ icon
|
||||
Jira.Entity entity -> str . fromEntity $ entity
|
||||
Jira.Image _ url -> image (Jira.fromURL url) "" mempty
|
||||
|
|
|
@ -20,7 +20,7 @@ extra-deps:
|
|||
- regex-pcre-builtin-0.95.0.8.8.35
|
||||
- doclayout-0.3
|
||||
- emojis-0.1
|
||||
- jira-wiki-markup-1.0.0
|
||||
- jira-wiki-markup-1.1.0
|
||||
- HsYAML-0.2.0.0
|
||||
- HsYAML-aeson-0.2.0.0
|
||||
- doctemplates-0.8.1
|
||||
|
|
|
@ -96,6 +96,10 @@ tests =
|
|||
"HCO ~3~^-^" =?>
|
||||
para ("HCO " <> subscript "3" <> superscript "-")
|
||||
|
||||
, "color" =:
|
||||
"This is {color:red}red{color}." =?>
|
||||
para ("This is " <> spanWith ("", [], [("color", "red")]) "red" <> ".")
|
||||
|
||||
, "linebreak" =:
|
||||
"first\nsecond" =?>
|
||||
para ("first" <> linebreak <> "second")
|
||||
|
|
Loading…
Add table
Reference in a new issue