aboutsummaryrefslogtreecommitdiff
path: root/test/command
AgeCommit message (Collapse)AuthorFilesLines
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-26Add test for issue #5708.John MacFarlane1-0/+12
2019-08-25Use new doctemplates, doclayout.John MacFarlane4-5/+0
+ 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-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-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-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-18Markdown writer: prefer using raw_attribute when enabled.John MacFarlane3-8/+8
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-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-13Man writer: Improved definition list term output.John MacFarlane1-1/+1
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 MacFarlane1-0/+9
Previously the bold-facing would be interrupted by other formatting, because we used `.B`. Closes #5620.
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.
2019-07-13fix filename and issue reference of previous commitmb211-0/+0
2019-07-12Pass through aria- attributes to HTML5.John MacFarlane1-0/+8
Also document addition of data- prefix to unknown attributes. Closes #5646.
2019-07-10RST reader: keep `name` property in `imgAttr`. (#5637)Brian Leung1-0/+10
Closes #5619.
2019-07-06Markdown reader: handle inline code more eagerly within lists. (#5628)Brian Leung1-0/+83
Closes #5627.
2019-06-21Support epigraph command in LaTeX Reader.oquechy1-0/+31
Closes #3523.
2019-06-11LaTeX writer: Don't highlight code in headings.John MacFarlane1-0/+8
This causes compilation errors, and I don't know how to work around them. Closes #5574.
2019-06-10LaTeX writer: Use mbox to get proper behavior inside `\sout`.John MacFarlane1-0/+10
Closes #5529.
2019-06-10Asciidoc writer: use doubled ## when necessary for spans.John MacFarlane1-0/+6
Closes #5566.
2019-06-10Asciidoc writer: ensure correct nesting strong/emph.John MacFarlane1-0/+6
Closes #5565.
2019-06-08LaTeX reader: pass through unknown listings language as class.John MacFarlane1-0/+8
Previously if the language was not in the list of listings- supported languages, it would not be added as a class, so custom syntax highlighting could not be used. Closes #5540.
2019-06-07LaTeX writer: Include inline code attributes with `--listings`.John MacFarlane1-0/+6
Closes #5420.
2019-06-04Include trailing {}s in raw latex commands.John MacFarlane1-0/+6
Change is in rawLaTeXInline in LaTeX reader, but it affects the markdown reader and other readers that allow raw LaTeX. Previously, trailing `{}` would be included for unknown commands, but not for known commands. However, they are sometimes used to avoid a trailing space after the command. The chances that a `{}` after a LaTeX command is not part of the command are very small. Closes #5439.
2019-06-04Markdown reader: don't create implicit reference for empty header.John MacFarlane1-0/+9
Closes #5549.
2019-06-03Avoid unwanted interpretation of def list term as other kind of block,John MacFarlane1-0/+8
e.g. ordered list item, in Markdown writer. Closes #554.
2019-05-29HTML writer: output video and audio elementsmb216-5/+24
depending on file extension of the image path
2019-05-28Remove command test for #5517.John MacFarlane1-32/+0
We need a better test that works cross-platform. Until then, removing this. Closes #5528.
2019-05-28HTML writer: emit empty alt tag in figures (#5518)Mauro Bieg3-5/+5
The same text is already in the <figcaption> and screen-readers would read it twice, see #4737
2019-05-28Add test for relative file: URI to #5517.John MacFarlane1-0/+6
2019-05-28Fix handling of `file:` URL scheme in `downloadOrRead` (#5522)Mauro Bieg1-0/+26
Move up the pattern match to be reachable, closes #5517. Previously `file:/` URLs were handled wrongly and pandoc attempted to make HTTP requests, which failed.
2019-05-25HTML reader: trim definition list termsAlexander Krotov1-0/+17
2019-05-22Markdown writer: Ensure the code fence is long enough.John MacFarlane1-0/+14
Previously too few backticks were used when the code block contained an indented line of backticks. (Ditto tildes.) Cloess #5519.
2019-05-21Markdown writer: Handle labels with integer namesJesse Rosenthal1-0/+18
Previously if labels had integer names, it could produce a conflict with auto-labeled reference links. Now we test for a conflict and find the next available integer. Note that this involves adding a new state variable `stPrevRefs` to keep track of refs used in other document parts when using `--reference-location=block|section` Closes #5495
2019-05-12Org writer: always indent src blocks content by 2 spacesAlbert Krewinkel1-6/+6
Emacs always uses two spaces when indenting the content of src blocks, e.g., when exiting a `C-c '` edit-buffer. Pandoc used to indent contents by the space-equivalent of one tab, but now always uses two spaces, too. Closes: #5440