aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2020-04-17LaTeX reader: don't put surrounding Div around Table.John MacFarlane1-26/+25
This reverts a change in the last release; the Div is no longer needed, because we can now put the id right in the Table's attributes. However, writers may still need to be modified to do something with the id in a Table (e.g. create an anchor), so in the short term we may lose the ability to link to tables in some writers.
2020-04-17API change: use PandocError for exceptions in Lua subsystemAlbert Krewinkel2-11/+11
The PandocError type is used throughout the Lua subsystem, all Lua functions throw an exception of this type if an error occurs. The `LuaException` type is removed and no longer exported from `Text.Pandoc.Lua`. In its place, a new constructor `PandocLuaError` is added to PandocError.
2020-04-15Modify toLegacyTable to cut up cells, add testsdespresc1-0/+61
Now a cell with dimension (h, w) will be cut up into h*w cells of dimension (1,1), all in the same grid position, with the upper-left holding the original cell contents and the rest being empty.
2020-04-15Use the new builders, modify readers to preserve empty headersdespresc30-502/+205
The Builder.simpleTable now only adds a row to the TableHead when the given header row is not null. This uncovered an inconsistency in the readers: some would unconditionally emit a header filled with empty cells, even if the header was not present. Now every reader has the conditional behaviour. Only the XWiki writer depended on the header row being always present; it now pads its head as necessary.
2020-04-15Adapt to the removal of the RowSpan, ColSpan, RowHeadColumns accessorsdespresc49-1803/+1803
2020-04-15Adapt to the newest Table type, fix some previous adaptation issuesdespresc58-3766/+4917
- Writers.Native is now adapted to the new Table type. - Inline captions should now be conditionally wrapped in a Plain, not a Para block. - The toLegacyTable function now lives in Writers.Shared.
2020-04-15Implement the new Table typedespresc57-1863/+4361
2020-04-15Markdown Reader: Fix inline code in lists (#6284)Nikolay Yakimov1-0/+47
Closes #6284. Previously inline code containing list markers was sometimes parsed incorrectly.
2020-04-15JATS reader: handle "label" element in section title.John MacFarlane1-0/+8
Closes #6288.
2020-04-11LaTeX writer: ensure that `-M csquotes` works even in fragment mode.John MacFarlane1-0/+6
Closes #6265.
2020-04-11HTML reader: support <bdo> (#6271)Tristan de Cacqueray1-0/+21
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo Closes #5794
2020-04-09Jira reader: improve icon conversionAlbert Krewinkel1-1/+1
Icons are now converted as follows: `(/)` to ✔, `(x)` to ❌, `(!)` to ❗, `(+)` to ➕, `(-)` to ➖, `(off)` to 🌙, and `(*)` to ☆. The new icons render well in most fonts. Furthermore, the UTF-8 characters all fit into 4-bytes. Closes: #6264
2020-04-07LaTeX reader: better handling of `\lettrine`.John MacFarlane1-2/+2
- SmallCaps instead of Span for the part after the initial capital. - Ensure that both arguments are parsed, so that in Markdown both are treated as raw LateX. (Closes #6258.)
2020-04-06Vimwiki reader: Add nested syntax highlighting (#6257)Vlad Hanciuta2-0/+8
Nested syntaxes are specified like this: {{{sql SELECT * FROM table }}} The preformatted code block parser has been extended to check if the first attribute of the block is not a `key=value` pair, and in that case it will be considered as a class. Closes #6256.
2020-04-04test/writer.jira: fix links, skip alias if it equals the targetAlbert Krewinkel1-4/+4
2020-04-04Jira: support citations, attachment links, and user linksAlbert Krewinkel2-3/+67
Closes: #6231 Closes: #6238 Closes: #6239
2020-04-03Jira reader: resolve parsing issues of blockquote, colorAlbert Krewinkel2-2/+21
Parsing problems occurring with block quotes and colored text have been resolved. Fixes: #6233 Fixes: #6235
2020-04-01Add test fixes for docbook writer changes.John MacFarlane2-8/+16
2020-03-31Jira reader: use span with class `underline` for inserted textAlbert Krewinkel1-0/+4
Jira text which is marked as `+inserted+` is converted into pandoc's default representation for underlined text: a span with class `underline`. Previously, the span was marked with the non-standard class `inserted`. Closes: #6237
2020-03-31Jira writer: convert spans with class `underline` to inserted textAlbert Krewinkel2-0/+29
Spans with class `underline` as converted into Jira text marked as `+inserted+`, i.e. surrounded by plus-signs.
2020-03-31Jira writer tests: update image in test/writer.jiraAlbert Krewinkel1-1/+1
2020-03-30Jira reader: retain image attributesAlbert Krewinkel1-0/+9
Jira images attributes as in `!image.jpg|align=right!` are retained as key-value pairs. Thumbnail images, such as `!example.gif|thumbnail!`, are marked by a `thumbnail` class in their attributes. Related to #6234.
2020-03-28More cleanup (#6209)Joseph C. Sible1-3/+2
* Simplify by collapsing a do block into a single <$> * Remove an unnecessary variable: `all` takes any Foldable, so only blocksToInlines needs toList.
2020-03-19Jira reader: fix parsing of tables without preceding blanklineAlbert Krewinkel1-0/+5
A bug was fixed which caused faulty parsing if a table was not preceded by a newline and the first table cell had no space after the initial `|` characters. Fixes: #6198
2020-03-18Jira reader: fix parsing of strikeout, emphasisAlbert Krewinkel1-0/+4
A bug was fixed which caused non-emphasized text containing digits and/or non-special symbols (like dots) to sometimes be parsed incorrectly. Fixes: #6196
2020-03-13Update copyright year (#6186)Albert Krewinkel34-35/+35
* Update copyright year * Copyright: add notes for Lua and Jira modules
2020-03-13Jira reader: support colored inline text, indented listsAlbert Krewinkel1-0/+4
* 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
2020-03-07Ms writer: fix definition lists so indent even when...John MacFarlane1-39/+39
paragraph indent is set to 0 (as is the default). Also ensure indent for display math that falls back to TeX.
2020-03-06Ms writer: use .QS/.QE instead of .RS/.RE for block quotes.John MacFarlane1-14/+14
2020-03-05Fix man reader test for previous change.John MacFarlane1-1/+1
2020-02-17Revert "Allow specifying string value in metadata using `!!literal` tag."John MacFarlane1-10/+0
This reverts commit 3493d6afaa6586c46898cf8bdb0c45bb70d31f28. This might be worth considering in the future, but let's not do it yet...the additional complexity needs a better justification.
2020-02-17Allow specifying string value in metadata using `!!literal` tag.John MacFarlane1-0/+10
This is experimental. Normally metadata values are interpreted as markdown, but if the !!literal tag is used they will be interpreted as plain strings. We need to consider whether this can still be implemented if we switch back from HsYAML to yaml for performance reasons.
2020-02-14Fixes: group biblatex citations even with prefix and suffix (#6058)Ethan Riley1-0/+32
Closes #5849. Previously biblatex citations were only grouped if there was no prefix. This patch allows them to be grouped in subgroups split by prefixes and suffixes, which allows better citation sorting.
2020-02-13Add highlight directive to the rST reader (#6140)Lucas Escot2-0/+28
2020-02-12Introduce new format variants for JATS (#6067)Albert Krewinkel8-2/+2247
New formats: - `jats_archiving` for the "Archiving and Interchange Tag Set", - `jats_publishing` for the "Journal Publishing Tag Set", and - `jats_articleauthoring` for the "Article Authoring Tag Set." The "jats" output format is now an alias for "jats_archiving". Closes: #6014
2020-02-12LaTeX reader: improve caption and label parsing.John MacFarlane3-16/+17
- Don't emit empty Span elements for labels. - Put tables with labels in a surrounding Div.
2020-02-11LaTeX reader: resolve `\ref` to table numbers.John MacFarlane1-0/+31
Closes #6137.
2020-02-10Fix spurious dots in markdown_mmd metadata outputJohn MacFarlane1-0/+12
Closes #6133 (regression).
2020-02-08reveal.js: ensure that pauses work even in title slides.John MacFarlane1-0/+18
Closes #5819.
2020-02-08Use <$> instead of >>= and return (#6128)Joseph C. Sible1-1/+1
2020-02-07Apply linter suggestions. Add fix_spacing to lint target in Makefile.John MacFarlane9-51/+50
2020-02-07Various minor cleanups and refactoring (#6117)Joseph C. Sible1-3/+3
* Use concatMap instead of reimplementing it * Replace an unnecessary multi-way if with a regular if * Use sortOn instead of sortBy and comparing * Use guards instead of lots of indents for if and else * Remove redundant do blocks * Extract common functions from both branches of maybe Whenever both the Nothing and the Just branch of maybe do the same function, do that function on the result of maybe instead. * Use fmap instead of reimplementing it from maybe * Use negative forms instead of negating the positive forms * Use mapMaybe instead of mapping and then using catMaybes * Use zipWith instead of mapping over the result of zip * Use unwords instead of reimplementing it * Use <$ instead of <$> and const * Replace case of Bool with if and else * Use find instead of listToMaybe and filter * Use zipWithM instead of mapM and zip * Inline lambda wrappers into the real functions * We get zipWithM from Text.Pandoc.Writers.Shared * Use maybe instead of fromMaybe and fmap I'm not sure how this one slipped past me. * Increase a bit of indentation
2020-02-05MediaWiki writer: prevent triple `[[[`.John MacFarlane1-0/+10
This confuses mediawiki's parser. So we insert a `<nowiki/>` no-op between a literal `[` and a link. Closes #6119.
2020-02-05LaTeX reader: skip comments in more places where this is needed.John MacFarlane1-0/+7
Closes #6114.
2020-02-03Fix duplicate frame classes in LaTeX/Beamer output.John MacFarlane1-0/+27
Close #6107.
2020-01-31csv reader: allow empty cells.John MacFarlane1-1/+5
2020-01-31Add Text.Pandoc.Readers.CSV (readCSV).John MacFarlane1-0/+17
This adds csv as an input format. The CSV table is converted into a pandoc simple table. Closes #6100.
2020-01-27Fix test suite for new skylighting.John MacFarlane1-2/+2
Closes #6086.
2020-01-15Lua filters: allow filtering of element lists (#6040)Albert Krewinkel4-1/+57
Lists of Inline and Block elements can now be filtered via `Inlines` and `Blocks` functions, respectively. This is helpful if a filter conversion depends on the order of elements rather than a single element. For example, the following filter can be used to remove all spaces before a citation: function isSpaceBeforeCite (spc, cite) return spc and spc.t == 'Space' and cite and cite.t == 'Cite' end function Inlines (inlines) for i = #inlines-1,1,-1 do if isSpaceBeforeCite(inlines[i], inlines[i+1]) then inlines:remove(i) end end return inlines end Closes: #6038
2020-01-12HTML writer: fix duplicate attributes on headings.John MacFarlane1-0/+6
Another regression from 2.7.x. Closes #6062.