aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)Author
2022-08-22HTML writer: revert to using `width` property for column widthsAlbert Krewinkel
The default `flex` and `overflow-x` properties of a column are set to `auto`. In combination, these changes allow to get good results when using columns with or without explicit widths.
2022-08-22Org writer: add support for jupyter nodebook cells.Albert Krewinkel
Closes: #6367
2022-08-22Org writer: prefix code language of ipynb code blocks with `jupyter-`.Albert Krewinkel
This is the convention used by the *emacs-jupyter* package.
2022-08-22Org writer: keep code block attributes as header args.Albert Krewinkel
This allows to keep more information in the resulting `src` blocks, making it easier to roundtrip from or through Org. Org babel ignores unknown header arguments.
2022-08-22Org writer: add code block identifier as `#+name` to src blocks.Albert Krewinkel
2022-08-21pandoc-server: handle `citeproc` parameter as documented.John MacFarlane
Closes #8235.
2022-08-21Fix regression with data uris in 2.19.1.John MacFarlane
In 2.19.1 we used the base64URL encoding rather than base64. This works in Safari, apparently, but not in other browsers. Closes #8239.
2022-08-21Fix typosluz paz
Found via `codespell -q 3 -S changelog.md -L bu,fo,ist,mke,multline,noes,ot,pard,pres,tabl,te,tothe`
2022-08-21Org reader: treat *emacs-jupyter* src blocks as code cells.Albert Krewinkel
This improves support for notebook-like org files that are intended to be used with emacs-jupyter package. Closes: #8236
2022-08-18Handle haddock 1.11.0 API changes (not noted in their changelog).John MacFarlane
2022-08-18HTML writer: use `flex` property for column widthsAlbert Krewinkel
Fixes: #8232
2022-08-17Integrate server into main pandoc.John MacFarlane
- Remove server flag. - Remove pandoc-server executable. - Add Text.Pandoc.Server as exposed module. [API change] - Re-use Opt (and our existing FromJSON instance) for Params. - Document.
2022-08-17Redo FromJSON for Opt so that optional values can be omitted.John MacFarlane
It would have been cleaner to make all of these values Maybes, so the JSON could be derived automatically. But this method preserves the existing API.
2022-08-17Org reader: treat "abstract" block as metadataAlbert Krewinkel
A block of type "abstract" is assumed to define the document's abstract. It is transferred from the main text to the metadata. Closes: #8204
2022-08-17LaTeX writer: add label to tables that have an identifierAlbert Krewinkel
Tables with an identifier are marked with a `\label`. A caption is always included in this case, even if the caption is empty. Closes: #8219
2022-08-16LaTeX writer: use `\textquotesingle` for straight quotes in text.John MacFarlane
2022-08-14T.P.Highlighting: Export `lookupHighlightingStyle`.John MacFarlane
[API change] Previously this lived in an unexported module T.P.App.CommandLineOptions, under the name `lookupHighlightStyle`.
2022-08-14Use base64 instead of base64-bytestring.John MacFarlane
It is supposed to be faster and more standards-compliant.
2022-08-13App: Remove unneeded MonadIO constraints in readSources.John MacFarlane
2022-08-13PDF: Use some standard PandocMonad functions instead of liftIO.John MacFarlane
2022-08-13Factor out convertWithOpts' from convertWithOpts.John MacFarlane
This runs in any PandocMonad, MonadIO, MonadMask instance.
2022-08-13Support --strip-comments in commonmark/gfm.John MacFarlane
This change makes the commonmark reader sensitive to `readerStripComments`. Closes #8222.
2022-08-13Lua: add function `pandoc.utils.citeproc`Albert Krewinkel
The function runs the *citeproc* processor on a Pandoc document. Exposing this functionality to Lua allows to make citation processing part of a filter or writer, simplifies the creation of multiple bibliographies, and enables the use of varying citation styles in different parts of a document.
2022-08-07LaTeX writer: fix widths of multicolumn cellsAlbert Krewinkel
Fixes: #8218
2022-08-03FB2 writer: fix handling of non-section Divs.John MacFarlane
This allows the writer to recurse into those Divs and find new sections inside them. See #8123.
2022-08-03Deprecate deLink.John MacFarlane
2022-08-03HTML reader: allow sublists that are not marked as items.Albert Krewinkel
The HTML standard requires all list items to be marked with a `<li>` tag, but some tools fail to do so for sublists. The reader now accepts these unwrapped lists as sublists. Closes: #8150
2022-08-03Org reader: add missing `/` to Windows file URI; fixes prev commitAlbert Krewinkel
2022-08-02fillMediaBag: Keep attributes of original image on SpanAlbert Krewinkel
Images that cannot be fetched are replaced with a Span that contains the image's description. The span now also retains all original image attributes and inherits all attributes of the image. Furthermore, the classes `image` and `placeholder` are added, and path and title are store in attributes `original-image-src` and `original-image-title`, respectively. Closes: #8099
2022-08-02Org reader: recognize absolute paths on WindowsAlbert Krewinkel
Fixes: #8201
2022-08-01Markdown reader: allow special span classes in any positionAlbert Krewinkel
2022-08-01Markdown reader: allow more attributes in special spansAlbert Krewinkel
Spans with "smallcaps" as the first class are converted to *SmallCaps* elements. While previously no other classes or attributes were allowed, additional classes, attributes, and an identifier are not permitted and kept in a *SmallCaps* wrapping *Span* element. The same change is applied to underline spans, where the first class must be either "ul" or "underline". Closes: #4102
2022-07-30Support rowspans and colspans in grid tables (#8202)Albert Krewinkel
* Add tests for zero-width and fullwidth chars in grid tables * T.P.Parsing: simplify `gridTableWith'`, `gridTableWith` [API Change] The functions `gridTableWith` and `gridTableWith'` no longer takes a boolean argument that toggles whether a table head should be parsed: both, tables with heads and without heads, are always accepted now. * Support colspans, rowspans, and multirow headers in grid tables. Grid tables in Markdown, reStructuredText, and Org can now contain cells spanning over multiple columns and/or multiple rows; table headers containing multiple rows are supported as well. Note: the markdown writer does not yet support these more complex grid table features.
2022-07-28MediaWiki reader: allow HTML comment after row start.John MacFarlane
Closes #8110.
2022-07-28DokuWiki reader: support latex plugin and math.John MacFarlane
The `tex_math_dollars` extension is now supported for `dokuwiki` (but off by default). Content inside `<latex>...</latex>` is parsed as raw LaTeX inline, and inside `<LATEX>..</LATEX>` as raw LaTeX block. In addition, this commit changes the behavior of `<php>...</php>` so that instead of producing a code block, it produces raw HTML with `<?php ... ?>`. Closes #8178.
2022-07-28Populate mediabag after filters have run. (#8114)Albert Krewinkel
The mediabag is filled with document resources after the filters have run. This allows, for example, filter authors to modify image paths before pandoc tries to fetch the images. Lua filters that rely on a filled mediabag can use the new `pandoc.mediabag.fill` function to perform that action in the filter. Closes: #8099
2022-07-26EPUB writer: allow choice of math method for v3.John MacFarlane
Previously we always used MathML for math in EPUB3, because the spec includes MathML. But this is not widely supported by readers, so it seems better to allow users to choose their math method as they can with EPUB2 or HTML. Closes #8164. NOTE! Existing workflows that produce EPUBv3 documents including math will be affected by this change. You must add `--mathml` to your command line if you want to continue producing MathML.
2022-07-25HTML writer: Allow "spanlike" classes to be combined.John MacFarlane
Previously classes like "underline" and "marked" had to be the first class in a span in order for the span to be interpreted as a "ul" or "mark" element. This commit allows these special classes to be "stacked," e.g. `[test]{.mark .underline}`; in addition, the special classes are no longer required to come first in the list of classes. See #8194 for context.
2022-07-23--self-contained: Handle `url()` in style elements.John MacFarlane
Previously we handled these in included CSS files but not in style elements. Closes #8193.
2022-07-18Unescape characters in `\lstinline` inside `\passthrough`.John MacFarlane
For full motivation, see #1629 ; this improves on 99e24cf18337b0b460005bf77e367783c34b75e7. Closes #8179.
2022-07-18Parsing.GridTable: remove use of unsafe function `last`Albert Krewinkel
2022-07-16RST writer: Fix missing spaces with nested inlines.John MacFarlane
Previously spaces around links inside italics were omitted. Closes #8182.
2022-07-15Lua: extend pandoc.system module. (#8184)Albert Krewinkel
The module now has the additional functions `list_directory`, `make_directory`, and `remove_directory`. This makes it easier to write cross-platform scripts that need to inspect or modify the file system.
2022-07-12Lua: add fields `pandoc.readers` and `pandoc.writers`. (#8177)Albert Krewinkel
The set of supported input and output formats is made available to Lua users.
2022-07-12RST writer: always escape literal backslash.John MacFarlane
Previously we didn't escape it when it is word-internal, but that seems wrong. See #8178.
2022-07-11Fix roff ms syntax highlighting definitions.John MacFarlane
Begin each string definition with `\&`. Closes #8175. Thanks to Branden Robinson.
2022-07-07RTF reader: support `\nosupersub`.John MacFarlane
Closes #8170.
2022-07-06Use `formatCode` from #7525 in HTML and MediaWiki (#8162)Elliot Bobrow
Move formatting from inside inline code elements to the outside in order to retain formatting.
2022-07-04Ensure that Nulls are ignored in creating slide shows.John MacFarlane
Also ensure that Nulls are ignored in sectionification by `makeSections`. Closes #8155.
2022-06-24PDF: use sha1 hash of filename when converting svg.John MacFarlane
The previous code threw away the directory component of the filename in constructing a new one. This led to surprising results if you had e.g. `foo/pic.svg` and `bar/pic.svg`; in the final PDF they'd be the same image, because the latter would overwrite the former in the temp directory.