aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-08-22Proof of concept: PandocSandboxed.sandbox3John MacFarlane
So far all this does is raise an error when liftIO is called.
2021-08-22App: Use runSandboxed instead of runIO.John MacFarlane
2021-08-22T.P.App.OutputSettings: Generalize some types...John MacFarlane
so we can run this with any instance of PandocMonad and MonadIO, not just PandocIO.
2021-08-22Add Text.Pandoc.Class.PandocSandboxed...John MacFarlane
exporting PandocSandboxed monad and runPandocSandboxed. [API change] So far this is just a skeleton; it works just like PandocIO right now...
2021-08-22Text.Pandoc.Filter: Generalize type of applyFilters...John MacFarlane
from PandocIO to any instance of MonadIO and PandocMonad. [API change]
2021-08-22PDF: generalize type of makePDF...John MacFarlane
instead of PandocIO, it can be used in any instance of PandocMonad, MonadIO, and MonadMask. [API change]
2021-08-22Class: Generalize type of extractMedia.John MacFarlane
It was uselessly restricted to PandocIO, instead of any instance of PandocMonad and MonadIO. [API change]
2021-08-22Add PandocSandboxError constructor to PandocError.John MacFarlane
2021-08-22Reorganize App to make it easier to limit IO in main loop.John MacFarlane
Previously we used liftIO fairly liberally. The code has been restructured to avoid this. A small behavior change is that pandoc will now fall back to latin1 encoding for inputs that can't be read as UTF-8. This is what it did previously for content fetched from the web and not marked as to content type. It makes sense to do the same for local files.
2021-08-22Text.Pandoc.Class: add readStdinStrict method to PandocMonad.John MacFarlane
[API change]
2021-08-22Lua subsystem and custom writers: generalize types from PandocIO...John MacFarlane
to any instance of PandocMonad and MonadIO. This involves an API change, since the type of runLua is now (PandocMonad m, MonadIO m) => Lua a -> m (Either PandocError a)
2021-08-22Clean up PDF module.John MacFarlane
Previously we had to run runIOorExplode inside withTempDir. Now that PandocIO is an instance of MonadMask, this is no longer necessary.
2021-08-22PandocIO: derive MonadCatch, MonadThrow, MonadMask.John MacFarlane
This will allow us to use withTempDir.
2021-08-22MANUAL: document error code 25John MacFarlane
2021-08-22App: Move output-file writing out of PandocMonad action.John MacFarlane
2021-08-22Add some more info regarding `--slide-level=0`Salim B
2021-08-22Harmonize spelling of 'slide show'Salim B
2021-08-21LaTeX-parser: restrict \endinput to current fileSimon Schuster
2021-08-21Regenerate README.md.2.14.2John MacFarlane
2021-08-20Add note to changelog.John MacFarlane
2021-08-20Fix typo in changelog.John MacFarlane
2021-08-20Update manual date and man page.John MacFarlane
2021-08-20Bump to 2.14.2, update changelog.John MacFarlane
2021-08-20MANUAL.txt/security: add a note on security risks of include directives.John MacFarlane
2021-08-20RST reader: Fix `:literal:` includes.John MacFarlane
These should create code blocks, not insert raw RST. Closes #7513.
2021-08-19Update changelog and AUTHORS.John MacFarlane
2021-08-19Improve docx reader's robustness in extracting images.John MacFarlane
The docx reader made a couple assumptions about how docx containers were laid out that were not always true, with the result that some images in documents did not get found/extracted. Closes #7511.
2021-08-19Clarify that each YAML block is a separate YAML documentWilliam Lupton
2021-08-18pptx: Include image title in descriptionEmily Bourke
The image title (i.e. `![alt text](link "title")`) was previously ignored when writing to pptx. This commit includes it in PowerPoint's description of the image, along with the link (which was already included). Fixes 7352.
2021-08-17Revise citeproc code to fit new citeproc 0.5 API.John MacFarlane
Linkification of URLs in the bibliography is now done in the citeproc library, depending on the setting of an option. We set that option depending on the value of the metadata field `link-bibliography` (defaulting to true, for consistency with earlier behavior, though the new behavior includes the CSL draft recommendation of hyperlinking the title or the whole entry if a DOI, PMID, PMCID, or URL field is present but not explicitly rendered). These changes implement the following recommendations from the draft CSL v1.0.2 spec (Appendix VI): > The CSL syntax does not have support for configuration of links. > However, processors should include links on bibliographic references, > using the following rules: > If the bibliography entry for an item renders any of the following > identifiers, the identifier should be anchored as a link, with the > target of the link as follows: > - url: output as is > - doi: prepend with "`https://doi.org/`" > - pmid: prepend with "`https://www.ncbi.nlm.nih.gov/pubmed/`" > - pmcid: prepend with "`https://www.ncbi.nlm.nih.gov/pmc/articles/`" > If the identifier is rendered as a URI, include rendered URI components > (e.g. "`https://doi.org/`") in the link anchor. Do not include any other > affix text in the link anchor (e.g. "Available from: ", "doi: ", "PMID: "). > If the bibliography entry for an item does not render any of > the above identifiers, then set the anchor of the link as the item > title. If title is not rendered, then set the anchor of the link as the > full bibliography entry for the item. Set the target of the link as one > of the following, in order of priority: > > - doi: prepend with "`https://doi.org/`" > - pmcid: prepend with "`https://www.ncbi.nlm.nih.gov/pmc/articles/`" > - pmid: prepend with "`https://www.ncbi.nlm.nih.gov/pubmed/`" > - url: output as is > > If the item data does not include any of the above identifiers, do not > include a link. > > Citation processors should include an option flag for calling > applications to disable bibliography linking behavior. Thanks to Benjamin Bray for getting this all working.
2021-08-17Document new link-bibliography metadata field.John MacFarlane
This affects whether hyperlinks are added to the bibliography by citeproc.
2021-08-17OOXML tests: silence warnings.John MacFarlane
These can make the test output confusing, making people think tests are failing when they're passing.
2021-08-17Rename TemplateWarning -> PowerpointTemplateWarning.John MacFarlane
@undergroundquizscene - I think TemplateWarning is apt to be confusing, since this actually doesn't have anything to do with what we call 'templates' in pandoc. Hence the change to a powerpoint-specific name.
2021-08-17Use released citeproc 0.5.John MacFarlane
2021-08-17pptx: Select layouts from reference doc by nameEmily Bourke
Until now, users had to make sure that their reference doc contains layouts in a specific order: the first four layouts in the file had to have a specific structure, or else pandoc would error (or sometimes successfully produce a pptx file, which PowerPoint would then fail to open). This commit changes the layout selection to use the layout names rather than order: users must make sure their reference doc contains four layouts with specific names, and if a layout with the right name isn’t found pandoc will output a warning and use the corresponding layout from the default reference doc as a fallback. I believe the use of names rather than order will be clearer to users, and the clearer errors will help them troubleshoot when things go wrong. - Add tests for moved layouts - Add tests for deleted layouts - Add newly included layouts to slideMaster1.xml to fix tests
2021-08-17Don’t compare cdLine in OOXML golden testsEmily Bourke
The `cdLine` field gives the line of the file some CData was found on. I don’t think this is a difference that should fail these golden tests, as the XML should still be parsable if nothing else has changed.
2021-08-17Provide more detailed XML diff in testsEmily Bourke
I had some failing tests and couldn’t tell what was different in the XML. Updating the comparison to return what’s different made it easier to figure out what was wrong, and I think will be helpful for others in future.
2021-08-17Add TemplateWarning log message type [API change]Emily Bourke
This is a general warning to use for messages about templates.
2021-08-17Escape backslashes in haddock comments (#7505)Emily Bourke
Any literal backslash needs to be escaped: these are currently showing up as “‘r’” instead of “‘\r’”. Co-authored-by: Emily Bourke <[email protected]>
2021-08-16Fix bug in last commit due to removal of take1WhileP.John MacFarlane
2021-08-15Multimarkdown sub- and superscripts (#5512) (#7188)OCzarnecki
Added an extension `short_subsuperscripts` which modifies the behavior of `subscript` and `superscript`, allowing subscripts or superscripts containing only alphanumerics to end with a space character (eg. `x^2 = 4` or `H~2 is combustible`). This improves support for multimarkdown. Closes #5512. Add `Ext_short_subsuperscripts` constructor to `Extension` [API change]. This is enabled by default for `markdown_mmd`.
2021-08-15Remove documentation for `.ul` shortcut for now.John MacFarlane
See #7307. Motivation: there is talk of removing this.
2021-08-15Make docx writer sensitive to `native_numbering` extension.John MacFarlane
Figure and table numbers are now only included if `native_numbering` is enabled. (By default it is disabled.) This is a behavior change with respect to 2.14.1, but the behavior is that of previous versions. The change was necessary to avoid incompatibilities between pandoc's native numbering and third-party cross reference filters like pandoc-crossref. Closes #7499.
2021-08-15Remove misleading description from command/citeproc-87 test.John MacFarlane
2021-08-13Convert Quoted in bib entries to special Spans...John MacFarlane
before passing them off to citeproc. This ensures that we get proper localization and flipflopping if, e.g., quotes are used in titles. Closes jgm/citeproc#87.
2021-08-13Citeproc: avoid odd handling of quotes.John MacFarlane
citeproc changes allow us to ignore Quoted elements; citeproc now uses its own method for represented quoted things, and only localizes and flipflops quotes it adds itself. See #87. The one thing left to do is to convert Quoted elements in bibliography databases (esp. titles) to `Span ("",["csl-quoted"],[])` before passing them to citeproc, IF the localized quotes for the quote type match the standard inverted commas.
2021-08-13Removed quote localization from citeproc processing.John MacFarlane
This is now done in citeproc itself.
2021-08-13Fix raw LaTeX injection issue (LaTeX writer).John MacFarlane
Using a code block containing `\end{verbatim}`, one could inject raw TeX into a LaTeX document even when `raw_tex` is disabled. Thanks to Augustin Laville for noticing the bug. Closes #7497.
2021-08-13LaTeX reader: proper implicit grouping around environment macros.John MacFarlane
2021-08-12Document use of the 'underline' class. (#7492)William Lupton
Addresses a comment in #7484.