aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)Author
2023-07-11SelfContained: Tweak identifier generation for svgs...John MacFarlane
so the difference between line endings between Windows and Unix is ignored. This allows test output to be deterministic across OS versions.
2023-07-11SelfContained: Use inline svg instead of data uris...John MacFarlane
for SVG images in HTML5. Closes #8948. Note that SelfContained does not have access to the writer name, so we check for HTML5 by determining whether the document starts with `<DOCTYPE! html>`. This means that inline SVG won't be used when generating document fragments. An API change could be contemplated to give more flexibility, but this is okay for now.
2023-07-10Typst reader: fix regression in recognition of display math.John MacFarlane
The last release caused all math to be parsed as inline math. Closes #8949.
2023-07-09Docx writer: Copy "mirror margins" property from reference.docx.John MacFarlane
Closes #8946.
2023-07-07Fix babel name for fa (should be "persian"). Closes #8944.John MacFarlane
Affects LaTeX writer.
2023-07-06Typst reader: filter out CR in raw.John MacFarlane
2023-07-06Typst reader: handle blockish content for link element.John MacFarlane
2023-07-06Rewrite Typst reader.John MacFarlane
This structure should make it easier to add new block and inline handlers.
2023-07-06Typst reader: allow block-level content in text element.John MacFarlane
2023-07-05MediaWiki reader: revise treatment of "link trail."John MacFarlane
Previously we only included ASCII letters. That is correct for English but not for, e.g., Spanish (see comment in #8525). A safer approach is to include all letters except those in the CJK unified ideograph ranges.
2023-07-05Use latest dev typst-hs.John MacFarlane
2023-07-05Typst reader: handle style, align, place in inline contexts too.John MacFarlane
2023-07-05Make modern AsciiDoc the target for `asciidoc`.John MacFarlane
The AsciiDoc community now regards the dialect parsed by `asciidoctor` as the official AsciiDoc syntax, so it should be the target of our `asciidoc` format. Closes #8936. The `asciidoc` output format now behaves like `asciidoctor` used to. `asciidoctor` is a deprecated synonynm. For the old `asciidoc` behavior (targeting the Python script), use `asciidoc_legacy`. The templates have been consolidated. Instead of separate `default.asciidoctor` and `default.asciidoc` templates, there is just `default.asciidoc`. Text.Pandoc.Writers.AsciiDoc API changes: - `writeAsciiDoc` now behaves like `writeAsciiDoctor` used to. - `writeAsciiDoctor` is now a deprecated synonym for `writeAsciiDoc`. - New exported function `writeAsciiDocLegacy` behaves like `writeAsciDoc` used to.
2023-07-04Typst writer: support `unlisted` class in headings.John MacFarlane
Closes #8941.
2023-07-03Get things working with latest dev version of typst.John MacFarlane
This supports package loading (as long as the package has been cached or is local).
2023-07-02Update line-through for asciidoc writer to custom inline style (#8934)Kevin Broch
Closes #8933
2023-07-01Typst writer: some math improvements.John MacFarlane
2023-07-01Docx writer: make relative widths work in tables.John MacFarlane
This didn't work before because we were missing an attribute that tells Word to used fixed widths rather than computing optimal ones.
2023-06-30Typst reader: improve info message for skipped elements.John MacFarlane
2023-06-30Fix typst reader for new typst-hs version.John MacFarlane
2023-06-30Typst writer: improve handling of autolinks.John MacFarlane
Closes #8931.
2023-06-28Markdown reader: Further strictness annotations.John MacFarlane
2023-06-28Markdown reader: add strictness annotations.John MacFarlane
This fixes the memory leak noted in #8762. Closes #8762.
2023-06-28LaTeX writer: Prevent babel language from being imported twice.John MacFarlane
Close #8925.
2023-06-28DokuWiki writer: fix lists with Div elements.John MacFarlane
The DokuWiki writer doesn't render Divs specially, so their presence in a list (e.g. because of custom-styles) need not prevent a regular DokuWiki list from being used. (Falling back to raw HTML in this case is pointless because no new information is given.) Closes #8920.
2023-06-28Allow all boolean flags to take an optional 'true' or 'false' valueSam S. Almahri
Default is true if no value is specified, so this is fully backwards-compatible. Closes #8788.
2023-06-27Support --id-prefix for markdown output.John MacFarlane
Closes #8878.
2023-06-27Removed unused import.John MacFarlane
2023-06-27PandocMonad: Use toTextM in `readFileFromDirs`.John MacFarlane
2023-06-27Fix toTextM for Windows.John MacFarlane
We forgot to filter out CRs as we do in toText.
2023-06-27Use toTextM instead of toText when possible.John MacFarlane
(That is, whenever we have the filename and are in a PandocMonad instance.) This will lead to more informative error messages for UTF8 encoding, indicating the file path and byte offset where the error occurs. Closes #8884.
2023-06-27Text.Pandoc.Class: add `toTextM`.John MacFarlane
This is like `Text.Pandoc.UTF8.toText`, except: - it takes a file path as first argument, in addition to bytestring contents - it raises an informative error with source position if the contents are not UTF8-encoded [API change] This replaces `utf8ToText` in `Text.Pandoc.App.Input`. See #8884.
2023-06-26Require commonmark >= 0.2.3 and fix import warning.John MacFarlane
2023-06-24Fix spacing issues.John MacFarlane
2023-06-24Make `--number-sections` work with JATS writer.John MacFarlane
2023-06-24Update TableBody RowHeadColumns caculation: change from max to min (#8634)Ruqi
This change sets RowHeadColumns to the minimum value of each row, which gives better results in cases where rows have different numbers of leading th tags.
2023-06-23More fixes to 5e381e3.John MacFarlane
These changes recognize that parseURI does not unescape the path. Another change is that the canonical form of the path used as the MediaBag key retains percent-encoding, if present; we only unescape the string when writing to a file. See #8918. Some tests are needed before the issue can be closed.
2023-06-23Fix bug in 5e381e3878b5da87ee7542f7e51c3c1a7fd84b89John MacFarlane
In the new code a comma mysteriously turned into a period. This would have prevented proper separation of the mime type and content in data uris. Thanks to @hseg for catching this.
2023-06-22Retain image query parameters in dokuwiki reader (#8887)ech0
While converting dokuwiki syntax to gfm, the query parameters of images were stripped from the output. In general this makes sense, as the parameters' semantics are specific to dokuwiki. But it makes it impossible to access the query in a filter. This change retains the query parameters of image urls in the dokuwiki reader, by adding it as an extra query attribute.
2023-06-22Textile reader: Add support for link references (#8706)Stephen Altamirano
Textile supports what it calls "link alias", which are analogous to Markdown's reference-style links.
2023-06-22Logging: add new log message type `ScriptingWarning` [API change]Albert Krewinkel
2023-06-22LaTeX reader: support alt text on images. (#8745)Albert Krewinkel
Closes: #8743
2023-06-20Fix a security vulnerability in MediaBag and T.P.Class.IO.writeMedia.John MacFarlane
This vulnerability, discovered by Entroy C, allows users to write arbitrary files to any location by feeding pandoc a specially crafted URL in an image element. The vulnerability is serious for anyone using pandoc to process untrusted input. The vulnerability does not affect pandoc when run with the `--sandbox` flag.
2023-06-20ChunkedHTML writer: Make math work in top-level page.John MacFarlane
Closes #8915.
2023-06-19Add Extracting log message for `--extract-media`.John MacFarlane
This message will also be triggered when media is being extracted to a temporary location, e.g. in PDF production.
2023-06-19Make `implicit_figures` work again in commonmark reader.John MacFarlane
Support for this (introduced in #6350) disappeared when we made an architectural change.
2023-06-19fix: add highlight for F# languageAdelar da Silva Queiróz
Fix for this SO question: https://tex.stackexchange.com/questions/563778/how-to-get-f-syntax-highlighting
2023-06-19Allow `epub-title-page` to be used in defaults files.John MacFarlane
This wasn't implemented before due to an oversight. Closes #8908.
2023-06-16LaTeX writer: Fix escaping of `&` in `\href` and `\url`.John MacFarlane
Closes #8903.
2023-06-08Add footer and multiple body parsing to JATS table reader (#8795)Noah Malmed
Closes #8765.