aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2019-09-08Org reader: modify handling of example blocks. (#5717)Brian Leung1-0/+60
* Org reader: allow the `-i` switch to ignore leading spaces. * Org reader: handle awkwardly-aligned code blocks within lists. Code blocks in Org lists must have their #+BEGIN_ aligned in a reasonable way, but their other components can be positioned otherwise.
2019-09-08Replace Element and makeHierarchical with makeSections.John MacFarlane7-22/+7
Text.Pandoc.Shared: + Remove `Element` type [API change] + Remove `makeHierarchicalize` [API change] + Add `makeSections` [API change] + Export `deLink` [API change] Now that we have Divs, we can use them to represent the structure of sections, and we don't need a special Element type. `makeSections` reorganizes a block list, adding Divs with class `section` around sections, and adding numbering if needed. This change also fixes some longstanding issues recognizing section structure when the document contains Divs. Closes #3057, see also #997. All writers have been changed to use `makeSections`. Note that in the process we have reverted the change c1d058aeb1c6a331a2cc22786ffaab17f7118ccd made in response to #5168, which I'm not completely sure was a good idea. Lua modules have also been adjusted accordingly. Existing lua filters that use `hierarchicalize` will need to be rewritten to use `make_sections`.
2019-09-08Revert changes to hierarchicalizeWithIds.John MacFarlane1-56/+0
Revert "hierarchicalize: ensure that sections get ids..." This reverts commit 212406a61d027d85712705e626954e0486a2bc34. Revert "Improve detection of headings in Divs by hierarchicalize." This reverts commit 6e2cfd6c97b1b8657f1f3e2b66090a2c3ba8d887. Revert "Shared.hierarchicalize: improve handling of div and section structure." This reverts commit 345b33762eb4cc6d57d74c76c4757a6166ee5c13.
2019-09-06hierarchicalize: ensure that sections get ids...John MacFarlane1-5/+5
even if they're in divs. Improves #3057.
2019-09-06Improve detection of headings in Divs by hierarchicalize.John MacFarlane1-5/+7
The structure ``` <h1>one</h1> <div> <h1>two</h1> </div> ``` should create two coordinate sections, not a section with a subsection. Now it does. Extends #3057.
2019-09-05Shared.hierarchicalize: improve handling of div and section structure.John MacFarlane1-0/+54
Previously Divs were opaque to hierarchicalize, so headings inside divs didn't get into the table of contents, for example (#3057). Now hierarchicalize treats Divs as sections when appropriate. For example, these structures both yield a section and a subsection: ``` html <div> <h1>one</h1> <div> <h2>two</h2> </div> </div> ``` ``` html <div> <h1>one</h1> <div> <h1>two</h1> </div> </div> ``` Note that ``` html <h1>one</h1> <div> <h2>two</h2> </div> <h1>three</h1> ``` gets parsed as the structure one two three which may not always be desirable. Closes #3057.
2019-09-05Add div.hanging-indent CSS to HTML templates.John MacFarlane7-0/+7
2019-09-05Add partial styles.html in HTML5 template.John MacFarlane7-156/+152
Avoid duplication in HTML templates by using styles.html partial. Change indentation of styles in template.
2019-09-04asciidoc writer: don't include `+` in code blocks for regular asciidoc.John MacFarlane1-6/+6
This is asciidoctor-specific. Amends 98ee6ca289ad7117b7336a57bcfc6f4b54463f4e.
2019-09-04Roff readers: better parsing of groups.John MacFarlane2-1/+8
We now allow groups where the closing `\\}` isn't at the beginning of a line. Closes #5410.
2019-09-03XML: change toEntities to emit numerical hex character references.John MacFarlane1-3/+3
Previously decimal references were used. But Polyglot Markup prefers hex. See #5718. This affects the output of pandoc with `--ascii`.
2019-09-02LaTeX reader: don't try to parse includes if raw_tex is set.John MacFarlane1-5/+2
When the `raw_tex` extension is set, we just carry through `\usepackage`, `\input`, etc. verbatim as raw LaTeX. Closes #5673.
2019-09-02HTML writer: use numeric character references with `--ascii`.John MacFarlane1-1/+1
Previously we used named character references with html5 output. But these aren't valid XML, and we aim to produce html5 that is also valid XHTML (polyglot markup). (This is also needed for epub3.) Closes #5718.
2019-09-02LaTeX reader: properly handle optional arguments for macros.John MacFarlane1-0/+8
Closes #5682.
2019-08-27LaTeX reader: fix `\\` in `\parbox` inside a table cell.John MacFarlane1-0/+13
Closes #5711.
2019-08-27Markdown reader: Headers: don't parse content over newline boundary.John MacFarlane1-0/+13
Closes #5714.
2019-08-27PowerPoint writer: Start numbering at appopriate numbers.Jesse Rosenthal4-0/+13
Starting numbers for ordered lists were previously ignored. Now we specify the number if it is something other than 1. Closes: #5709
2019-08-26Add test for issue #5708.John MacFarlane1-0/+12
2019-08-25Use new doctemplates, doclayout.John MacFarlane19-2372/+2361
+ Remove Text.Pandoc.Pretty; use doclayout instead. [API change] + Text.Pandoc.Writers.Shared: remove metaToJSON, metaToJSON' [API change]. + Text.Pandoc.Writers.Shared: modify `addVariablesToContext`, `defField`, `setField`, `getField`, `resetField` to work with Context rather than JSON values. [API change] + Text.Pandoc.Writers.Shared: export new function `endsWithPlain` [API change]. + Use new templates and doclayout in writers. + Use Doc-based templates in all writers. + Adjust three tests for minor template rendering differences. + Added indentation to body in docbook4, docbook5 templates. The main impact of this change is better reflowing of content interpolated into templates. Previously, interpolated variables were rendered independently and intepolated as strings, which could lead to overly long lines. Now the templates interpolated as Doc values which may include breaking spaces, and reflowing occurs after template interpolation rather than before.
2019-08-24Change optMetadataFile type from Maybe to List (#5702)Owen McGrath3-0/+9
Changed optMetadataFile from `Maybe FilePath` to `[FilePath]`. This allows for multiple YAML metadata files to be added. The new default value has been changed from `Nothing` to `[]`. To account for this change in `Text.Pandoc.App`, `metaDataFromFile` now operates on two `mapM` calls (for `readFileLazy` and `yamlToMeta`) and a fold. Added a test (command/5700.md) which tests this functionality and updated MANUAL.txt, as per the contributing guidelines. With the current behavior, using `foldr1 (<>)`, values within files specified first will be used over those in later files. (If the reverse of this behavior would be preferred, it should be fixed by changing foldr1 to foldl1.)
2019-08-23Add test for #5690.John MacFarlane1-0/+16
2019-08-23Ensure proper nesting when we have long ordered list markers.John MacFarlane1-0/+11
Closes #5705.
2019-08-16Lua: traverse nested blocks and inlines in correct orderAlbert Krewinkel1-0/+38
Traversal methods are updated to use the new Walk module such that sequences with nested Inline (or Block) elements are traversed in the order in which they appear in the linearized document. Fixes: #5667
2019-08-14LaTeX reader: improve withRaw so it can handle cases where...John MacFarlane1-0/+9
the token string is modified by a parser (e.g. accent when it only takes part of a Word token). Closes #5686. Still not ideal, because we get the whole `\t0BAR` and not just `\t0` as a raw latex inline command. But I'm willing to let this be an edge case, since you can easily work around this by inserting a space, braces, or raw attribute. The important thing is that we no longer drop the rest of the document after a raw latex inline command that gobbles only part of a Word token!
2019-08-14Rename test for 5685 -> 5684 (typo in last commit).John MacFarlane1-0/+0
Closes #5684. (Note that #5685 is NOT closed by previous commit.)
2019-08-14Add thin space when needed in LaTeX quote ligatures.John MacFarlane1-0/+6
Closes #5685.
2019-08-11JIRA writer: Remove escapeStringForJira for code blocksJan-Otto Kröpke1-16/+16
2019-07-28Update muse template to handle multiple authors better.John MacFarlane1-1/+1
2019-07-28Use doctemplates 0.3, change type of writerTemplate.John MacFarlane7-10/+21
* Require recent doctemplates. It is more flexible and supports partials. * Changed type of writerTemplate to Maybe Template instead of Maybe String. * Remove code from the LaTeX, Docbook, and JATS writers that looked in the template for strings to determine whether it is a book or an article, or whether csquotes is used. This was always kludgy and unreliable. To use csquotes for LaTeX, set `csquotes` in your variables or metadata. It is no longer sufficient to put `\usepackage{csquotes}` in your template or header includes. To specify a book style, use the `documentclass` variable or `--top-level-division`. * Change template code to use new API for doctemplates.
2019-07-24HTML writer: ensure TeX formulas are rendered correctly (#5658)Philip Pesca1-1/+1
The web service passed in to `--webtex` may render formulas using inline or display style by default. Prefixing formulas with the appropriate command ensures they are rendered correctly. This is a followup to the discussion in #5656.
2019-07-23HTML writer: render inline formulas correctly with --webtex (#5656)Philip Pesca1-0/+14
We add `\textstyle` to the beginning of the formula to ensure it will be rendered in inline style. Closes #5655.
2019-07-22Fix error introduced in change to test for 4669.John MacFarlane1-1/+1
2019-07-22LaTeX reader: support tex `\tt` command.John MacFarlane2-1/+7
Closes #5654.
2019-07-22Org reader: accept ATTR_LATEX in block attributesAlbert Krewinkel1-0/+7
Attributes for LaTeX output are accepted as valid block attributes; however, their values are ignored. Fixes: #5648
2019-07-20LaTeX writer: fix line breaks at start of paragraph.John MacFarlane1-0/+18
Previously we just omitted these. Now we render them using `\hfill\break` instead of `\\`. This is a revision of a PR by @sabine (#5591) who should be credited with the idea. Closes #3324.
2019-07-20LaTeX reader: search for image with list of extensions...John MacFarlane1-0/+6
like latex does, if an extension is not provided. Closes #4933.
2019-07-19Markdown: Ensure that expanded latex macros end with space if original did.John MacFarlane1-0/+9
Closes #4442.
2019-07-19Change order of ilvl and numId in document.xml (#5647)Agustín Martín Barbero4-0/+0
Workaround for Word Online shortcomming. Fixes #5645 Also, make list para properties go first. This reordering of properties shouldn't be necessary but it seems Word Online does not understand the docx correctly otherwise.
2019-07-18Markdown writer: prefer using raw_attribute when enabled.John MacFarlane5-14/+56
The `raw_attribute` will be used to mark raw bits, even HTML and LaTeX, and even when `raw_html` and `raw_tex` are enabled, as they are by default. To get the old behavior, disable `raw_attribute` in the writer. Closes #4311.
2019-07-18HTML writer: ensure that line numbers in code blocks get id-prefix.John MacFarlane1-0/+22
Closes #5650.
2019-07-16Dokuwiki writer: handle mixed lists without HTML fallback.John MacFarlane1-0/+25
Closes #5107.
2019-07-15Customizable type of PDF/A for the ConTeXt writer (issue #5608) (#5610)Karl Pettersson2-2/+4
* Let the user choose type of PDF/A generated with ConTeXt (closes #5608) * Updated ConTeXt test documents for changes in tagging * Updated color profile settings in accordance with ConTeXt wiki * Made ICC profile and output intent for PDF/A customizable * Read pdfa variable from meta (and updated manual)
2019-07-14Update test for new skylighting.John MacFarlane2-14/+12
2019-07-14Muse: add RTL supportAlexander Krotov2-0/+10
Closes #5551
2019-07-13Fix #4499: add mbox and hbox handling to LaTeX reader (#5586)Vasily Alferov1-0/+87
When `+raw_tex` is enabled, these are passed through literally. Otherwise, they are handled in a way that emulates LaTeX's behavior.
2019-07-13Merge pull request #5589 from blmage/fix-3992John MacFarlane5-1/+33
Add support for EPUB2 covers (fix #3992)
2019-07-13Man writer: Improved definition list term output.John MacFarlane2-18/+18
Now we boldface code but not other things. This matches the most common style in man pages (particularly option lists). Also, remove a regression in the last commit in which 'nowrap' was removed.
2019-07-13Man writer: fixed boldfacing of definition terms.John MacFarlane2-17/+26
Previously the bold-facing would be interrupted by other formatting, because we used `.B`. Closes #5620.
2019-07-13Merge pull request #5606 from blmage/odt-framesJohn MacFarlane2-0/+2
Improve the parsing of frames in ODT documents
2019-07-13LaTeX reader: Properly handle \providecommand and environment...John MacFarlane1-0/+23
They are now ignored if the corresponding command or environment is already defined. Closes #5635.