aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
AgeCommit message (Collapse)AuthorFilesLines
2019-02-18Muse reader: add secondary note supportAlexander Krotov1-5/+11
2019-02-18Muse writer: escape secondary notesAlexander Krotov1-7/+10
2019-02-18Move a comment in Muse WriterAlexander Krotov1-1/+1
2019-02-16T.P.Lua: split StackInstances into smaller Marshaling modulesAlbert Krewinkel11-174/+235
2019-02-16T.P.Lua: get CommonState from Lua globalAlbert Krewinkel3-54/+64
This allows more control over the common state from within Lua scripts.
2019-02-15ipynb writer: don't create attachments for images with absolute URIs.John MacFarlane1-2/+3
...including data: URIs. Closes #5303.
2019-02-15Markdown reader: fix bug parsing fenced code blocks.John MacFarlane1-2/+3
Previously parsing would break if the code block contained a string of backticks of sufficient length followed by something other than end of line. Closes #5304.
2019-02-15Revert "JATS writer: Support citations."John MacFarlane1-4/+3
This reverts commit 39889c22df578a4310bcf549fcd507c08fbf1416.
2019-02-15JATS writer: Support citations.John MacFarlane1-3/+4
2019-02-15JATS reader: handle citations with multiple references.John MacFarlane1-7/+10
The rid attribute can have a space-separated list of ids. Closes #5310.
2019-02-12Docx reader: unwrap sdt elements in footnotes and comments.Jesse Rosenthal1-3/+3
We had previously walked the document to unwrap sdt/sdtContent and smartTag tags in `word/document.xml`, but not in the `word/{foot/end}note.xml` and `word/comments.xml`. Closes #5302
2019-02-11Remove redundant import.John MacFarlane1-1/+0
2019-02-10ipynb writer: keep plain text fallbacks in output...John MacFarlane1-26/+14
even if a richer format is included. We don't know what output format will be needed. The fallback can always be weeded out using a filter. Closes #5293.
2019-02-10Implement aria roles doc-bibliography, doc-biblioentry, doc-biblioref.John MacFarlane1-2/+10
Note that doc-biblioref is only used when link-citations produces links, since it belongs on links. See #4213.
2019-02-10JATS writer: wrap figure caption in <p> to fix validation (#5292)Mauro Bieg1-1/+1
closes #5290
2019-02-09ipynb writer - ensure final newline.John MacFarlane1-0/+1
2019-02-09Lua filters: load module `pandoc` before calling `init.lua` (#5287)Albert Krewinkel1-6/+27
The file `init.lua` in pandoc's data directory is run as part of pandoc's Lua initialization process. Previously, the `pandoc` module was loaded in `init.lua`, and the structure for marshaling was set-up after. This allowed simple patching of element marshaling, but made using `init.lua` more difficult: - it encouraged mixing essential initialization with user-defined customization; - upstream changes to init.lua had to be merged manually; - accidentally breaking marshaling by removing required modules was possible; Instead, all required modules are now loaded before calling `init.lua`. The file can be used entirely for user customization. Patching marshaling functions, while discouraged, is still possible via the `debug` module.
2019-02-09T.P.Lua: properly indent module-loading errorAlbert Krewinkel1-1/+1
2019-02-09Fixed asciidoc display math in list contexts.John MacFarlane1-17/+46
2019-02-09Asciidoctor writer sets the stem attribute if it contains latexmathTG1-1/+7
2019-02-09Adds Asciidoctor sprcific writer and testsTG2-12/+31
2019-02-09AsciiDoc Writer: DisplayMath as asciidoc latexmath blockTG1-1/+4
2019-02-09AsciiDoc writer: change bulletListLevel and orderedListLevel...John MacFarlane1-4/+4
so that 0 means "not in a list," which is more what one would expect.
2019-02-08Improve tight/loose list handling.John MacFarlane1-2/+9
Closes #5285. Previously the algorithm allowed list items with a mix of Para and Plain, which is never wanted. compactify in T.P.Shared has been modified so that, if a list's items contain (at the top level) Para elements (aside from perhaps at the very end), ALL Plains are converted to Paras.
2019-02-08Fix misleading code comment.John MacFarlane1-2/+1
2019-02-08Make --metadata-file use pandoc-markdown (#5279)Mauro Bieg1-1/+2
see #5272
2019-02-08Docx reader: fix paths in archive to prevent Windows failureJesse Rosenthal1-1/+6
Some paths in archives are absolute (have an opening slash) which, for reasons unknown, produces a failure in the test suite on MS Windows. This fixes that by removing the leading slash if it exists. Closes #5277 (previously closed with 4cce0ef but reopened due to this bug).
2019-02-07Revert "Docx reader: Fix windows error"Jesse Rosenthal1-2/+1
This reverts commit 2142bbe572cea00b7bb5ad3e10a3afb26845a1f7.
2019-02-07Docx reader: Fix windows errorJesse Rosenthal1-1/+2
Try fixing a parsing error on windows by insisting that the parser use a Posix filepath library for splitting doc paths in a zipfile. (It might default on Windows to using a backslash as a separator, while it's always a forward-slash in zip archives.)
2019-02-07Docx reader: Some code cleanupJesse Rosenthal1-15/+25
* clarify function name. We had previously used `getDocumentPath`, but `Document` is an overdetermined term here. Use `getDocumentXmlPath` to make clear what we're doing. * Use field notation for setting ReaderEnv. As we've added (and continue to add) fields, the assignment by position has gotten harder to read. * figure out document.xml path once at the beginning of parsing, and add it to the environment, so we can avoid repeated lookups.
2019-02-07Docx reader: Extend dynamic xml location to detecting relationshipsJesse Rosenthal1-12/+19
Getting the location used to depend on a hard-coded .rels file based on "word/document.xml". We now dynamically detect that file based on the document.xml file specified in "_rels/.rels"
2019-02-06Docx reader: Dynamically determine document.xml path.Jesse Rosenthal1-3/+12
The desktop Word program places the main document file in "word/document.xml", but the online word places it in "word/document2.xml". This file path is actually stated in the root "_rels/.rels" file, in the "Relationship" element with an "http://../officedocument" type. Closes #5277
2019-02-06Handle Word files generated by Microsoft Word Online.John MacFarlane1-0/+2
For some reason, Word in Office 365 Online uses `document2.xml` for the content, instead of `document.xml`. This causes pandoc not to be able to parse docx. This quick fix has the parser check for both `document.xml` and `document2.xml`. Addresses #5277, but a more robust solution would be to get the name of the main document dynamically (who knows whether it might change again?).
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel121-238/+298
Quite a few modules were missing copyright notices. This commit adds copyright notices everywhere via haddock module headers. The old license boilerplate comment is redundant with this and has been removed. Update copyright years to 2019. Closes #4592.
2019-02-04More carefully groom ipynb default extensions.John MacFarlane1-2/+18
2019-02-04Add `all_symbols_escapable` to githubMarkdownExtensions.John MacFarlane1-1/+1
2019-02-04Markdown reader: add newline when parsing blocks in YAML.John MacFarlane1-9/+10
Otherwise last block gets parsed as a Plain rather than a Para. This is a regression in pandoc 2.x. This patch restores pandoc 1.19 behavior. Closes #5271.
2019-02-02ipynb reader: handle images referring to attachments.John MacFarlane1-1/+9
Previously we didn't strip off the attachment: prefix, so even though the attachment is available in the mediabag, pandoc couldn't find it.
2019-02-02HTML5 writer: implement WAI-ARIA roles for (end)notes.John MacFarlane1-12/+25
See #4213.
2019-02-02Shared: withTempDir is no longer used in the codebase.John MacFarlane1-0/+2
Add comment to remove it in next major release.
2019-02-02PDF: More conservative solution to #777.John MacFarlane1-2/+11
Now, instead of always creating temp dirs in the home directory on Windows, we only do it if the system tempdir name contains tildes. (This will be the case for longer usernames only.) Closes #1192.
2019-02-02PDF: use system temp dir and set TEXMFOUTPUT.John MacFarlane1-8/+5
Previously the temp directory was created inside the working directory, so that programs like epstopdf.pl would be allowed to run in restricted mode. However, setting TEXMFOUTPUT allows these programs to run in the tmpdir inside the system temp directory. This is a better solution than cd51983. Using the system temp dir prevents problems when pandoc is run inside a synced directory (e.g. dropbox). Partially addresses #1192.
2019-02-02MIME: add WebPMauro Bieg1-0/+1
fixes #5267
2019-02-01LaTeX writer: use right fold for escapeString.John MacFarlane1-15/+13
This is more elegant than the explicit recursive we were using.
2019-02-01LaTeX writer: code simplification in escaping.John MacFarlane1-20/+21
2019-02-01Markdown writer: use markdown="1" when appropriate for Divs.John MacFarlane1-0/+6
When `native_divs` and `markdown_in_html_blocks` are disabled but `raw_html` and `markdown_attribute` are enabled...
2019-02-01LaTeX writer: avoid `{}` after control sequences when escaping.John MacFarlane1-26/+36
`\ldots{}.` doesn't behave as well as `\ldots.` with the latex ellipsis package. This patch causes pandoc to avoid emitting the `{}` when it is not necessary. Now `\ldots` and other control sequences used in escaping will be followed by either a `{}`, a space, or nothing, depending on context. Thanks to Elliott Slaughter for the suggestion.
2019-01-31LaTeX reader: don't let `\egroup` match `{`.John MacFarlane1-3/+3
`braced` now actually requires nested braces. Otherwise some legitimate command and environment definitions can break (see test/command/tex-group.md).
2019-01-30Update copyright year in version.John MacFarlane1-1/+1
2019-01-30Org reader: add support for #+SELECT_TAGS.leungbk4-23/+78