aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
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.
2020-01-11Lua: add methods `insert`, `remove`, and `sort` to pandoc.ListAlbert Krewinkel1-40/+80
The functions `table.insert`, `table.remove`, and `table.sort` are added to pandoc.List elements. They can be used as methods, e.g. local numbers = pandoc.List {2, 3, 1} numbers:sort() -- numbers is now {1, 2, 3}
2020-01-11pandoc.List.lua: make `pandoc.List` a callable constructorAlbert Krewinkel1-0/+9
It is now possible to construct a new List via `pandoc.List()` instead of `pandoc.List:new()`.
2020-01-11Add tests for pandoc.List moduleAlbert Krewinkel2-0/+113
2020-01-10LaTeX reader: allow beamer overlays for all commands in all raw tex.John MacFarlane1-0/+8
This affecs parsing of raw tex in LaTeX and in Markdown and other formats. Closes #6043.
2020-01-08LaTeX reader: improve parsing of raw environments.John MacFarlane1-0/+11
If parsing fails in a raw environment (e.g. due to special characters like unescaped `_`), try again as a verbatim environment, which is less sensitive to special characters. This allows us to capture special environments that change catcodes as raw tex when `-f latex+raw_tex` is used. Closes #6034.
2020-01-07Jira writer: fix output of table headersAlbert Krewinkel1-0/+5
Headers were missing from tables. Fixes: #6035
2020-01-07Fix regression in handling of columns in beamer slides.John MacFarlane1-0/+91
Columns in title slides were causing problems with slide division. Closes #6033.
2020-01-07Reveal.js writer: restore old behavior for 2D nesting.John MacFarlane1-1/+19
The fix to #6030 actually changed behavior, so that the 2D nesting occurred at slide level N-1 and N, instead of at the top-level section. This commit restores the 2.7.3 behavior. If there are more than 2 levels, the top level is horizontal and the rest are collapsed to vertical. Closes #6032.
2020-01-05Fix regression in beamer slide structure with certain slide levels.John MacFarlane1-0/+43
Closes #6030.
2020-01-05Fix revealjs slide structure regression with certain slide levels.John MacFarlane1-0/+35
Partially addresses #6030.
2020-01-03Fix test/tables.orgAlbert Krewinkel1-4/+4
Editor usage mistake caused a broken reference file.
2020-01-03Org writer: remove extra spaces from table cellsAlbert Krewinkel1-29/+29
Closes: #6024
2020-01-01LaTeX writer: properly handle unnumbered headings level 4+.John MacFarlane1-1/+1
Closes #6018. Previously the `\paragraph` command was used instead of `\paragraph*` for unnumbered level 4 headings.
2019-12-30Update JATS dtd (#6020)Arfon Smith2-6/+6
The current DTD for the JATS writer template is for Journal Publishing (JATS-journalpublishing1.dtd), which does not permit ext-link as a valid child (https://jats.nlm.nih.gov/publishing/tag-library/1.1/element/publisher-name.html). This update modifies the default output template to be the less restrictive JATS archiving and interchange DTD which systems like PubMed use internally to represent their articles.
2019-12-27Fix parsing bug affected indented code after raw HTML.John MacFarlane2-0/+37
Closes #6009, #5360.
2019-12-21HTML reader tests: modify round-trip tests...John MacFarlane1-0/+4
to avoid a special failure case involving makeSections.
2019-12-20Jira writer: use jira-wiki-markup rendererAlbert Krewinkel2-146/+64
Pandoc's AST is translated into the Jira AST, which is then rendered by the dedicated Jira printer. The following improvements are included in this change: - non-jira raw blocks are fully discarded instead of showing as blank lines; - table cells can contain multiple blocks; - unnecessary blank lines are removed from the output; - markup chars within words are properly surrounded by braces; - preserving soft linebreaks via `--wrap=preserve` is supported. Note that backslashes are rendered as HTML entities, as there appears no alternative to produce a plain backslash if it is followed by markup. This may cause problems when used with confluence, where rendering seems to fail in this case. Closes: #5926
2019-12-19Org reader: fix parsing problem for colons in headlineAlbert Krewinkel1-0/+10
Fixed a problem where words surrounded by colons could causing parse failures in some cases when they occurred in headers. Fixes: #5993
2019-12-18Org reader: wrap named table in div, using name as idAlbert Krewinkel2-9/+17
Closes: #5984
2019-12-17Add jira reader (#5913)Albert Krewinkel5-0/+587
Closes #5556
2019-12-17Adjust test to work with Windows (I hope).John MacFarlane1-1/+1
2019-12-17Improved --toc generation.John MacFarlane1-0/+56
2019-12-17Improved makeSections so we don't get doubled attributes.John MacFarlane2-4/+4
Closes #5986.
2019-12-17Added test for #5986.John MacFarlane1-0/+16
2019-12-17Add section-divs command test (failing).John MacFarlane1-0/+25
2019-12-13Org reader: add table labels to caption if both are presentAlbert Krewinkel1-1/+1
The table `#+NAME:` or `#+LABEL:` is added to the table's caption in the form of an empty span with the label set as the span's ID. Closes: #5984
2019-12-11ConTeXt template: Adjustments to title formatting (#5949)Denis Maier1-3/+3
Added `\setupinterlinespace` to `title`, `subtitle`, `date` and `author` elements. Otherwise longer titles that run over multiple lines will look squashed as `\tfd` etc. won't adapt the line spacing to the font size.
2019-12-07Fix --toc-depth regression in 2.8.John MacFarlane1-0/+15
Closes #5967.