summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Markdown
AgeCommit message (Collapse)Author
2024-03-18Export `isOrderedListMarker` from T.P.Writers.Shared.John MacFarlane
[API change] This was formerly in T.P.Writers.Markdown.Inline, but we need to use it in the Typst writer too.
2024-01-18Markdown writer: fix output for pipe tables...John MacFarlane
...with a huge number of columns. Previously we got invalid pipe tables when the number of table columns exceeded the setting of `--columns`. Closes #9346.
2023-06-27Support --id-prefix for markdown output.John MacFarlane
Closes #8878.
2023-04-28Commonmark writer: use shortcut reference links.John MacFarlane
Commonmark supports these.
2023-01-15Markdown, CommonMark: add support for wiki links. [API change]Albert Krewinkel
Adds the Markdown/CommonMark extensions `wikilinks_title_after_pipe` and `wikilinks_title_before_pipe`. The former enables links of style `[[Name of page|Title]]` and the latter `[[Title|Name of page]]`. Titles are optional in both variants, so this works for both: `[[https://example.org]]`, `[[Name of page]]`. The writer is modified to render links with title `wikilink` as a wikilink if a respective extension is enabled. Pandoc will use `wikilinks_title_after_pipe` if both extensions are enabled. Closes: #2923
2023-01-10Update copyright years, it's 2023!Albert Krewinkel
2022-11-19Add support for `mark` extension for highlighted text.John MacFarlane
+ Extensions: Add `Ext_mark` extension. This is not part of the pandoc extensions by default. + Markdown reader: parse `==..==` if `mark` extension enabled. + Markdown writer: support `mark` extension. + Docx writer: render Span with class `mark` as highlighted. Currently yellow is hardcoded. + LaTeX writer: support highlighted text for Span with class `mark`. + RST writer: use special `mark` role for Span with class `mark`. + Update MANUAL.txt. Closes #7743.
2022-11-11Markdown writer: escape `!` before `[`.John MacFarlane
See #8254.
2022-10-31Add explicit imports to fix compiler warnings.John MacFarlane
2022-10-31First stab at mtl 2.3 compliance.John MacFarlane
This will no doubt produce a bunch of warnings and hence CI failures, which we'll need to work around with explicit imports.
2022-10-18T.P.Shared: remove `escapeURI`, `isURI`.John MacFarlane
These are now exported by Text.Pandoc.URI, and removing them from Shared helps make module structure more straightforward.
2022-10-15Minor code cleanups.John MacFarlane
2022-10-03Rename T.P.Network.HTTP -> T.P.URI.John MacFarlane
This is still an unexported internal module. Export `urlEncode`, `escapeURI`, `isURI`, `schemes`, `uriPathToPath`. Re-export `escapeURI` and `isURI` from T.P.Shared (as they were exported before); drop exports of `schemes` and `uriPathToPath` [API change]. With this change, T.P.Class no longer depends on T.P.Shared.
2022-09-27Fix small whitespace things.John MacFarlane
2022-08-27HTML, Markdown writers: filter out empty class attributes.John MacFarlane
These should not be generated by any pandoc readers, but they might be produced programatically. Technically that's a misuse of the AST, but since the expectation that the classes are nonempty strigs is not encoded in the types, it can happen. This patch limits the damage if it does, preventing invalid markdown attributes like `{.}` from being written. Cloess #8251.
2022-03-18Markdown writer: move table-related code into submodule.Albert Krewinkel
2022-03-07Markdown writer: update escaping rules for `\`.John MacFarlane
We now escape `\` only if `raw_tex` is enabled or it is followed by a non-alphanumeric.
2022-02-03Trim whitespace from math in --webtex.John MacFarlane
This fixes problems with --webtex and markdown output, when display math starts or ends with a newline. Closes #7892.
2022-02-03Whitespace fixes.John MacFarlane
2022-01-02Copyright notices: update for 2022Albert Krewinkel
2021-12-19Add a writer for Markua 0.10 (#7729)binaarinen
Markua is a markdown variant used by Leanpub. More information about Markua can be found at https://leanpub.com/markua/read. Adds a new exported function `writeMarkua` from T.P.Writers.Markdown. [API change] Closes #1871. Co-authored by Tim Wisotzki and Samuel Lemmenmeier.
2021-12-14Markdown writer: avoid extra space before citation suffix...John MacFarlane
if it already starts with a space.
2021-12-14Markdown writer: ensure semicolon btw locator and next citation...John MacFarlane
when an author-in-text citation has a locator and following citations.
2021-12-03Improve Markdown writer escaping.John MacFarlane
This fixes escaping for '#' in particular. Closes #7726.
2021-11-15Markdown writer: don't create autolinks when this loses information.John MacFarlane
Previously we sometimes lost attributes when rendering links as autolinks. Closes #7692.
2021-11-04Allow `plain` to be used in raw attribute syntax.John MacFarlane
2021-10-05Avoid bad wraps in markdown writer at the Doc Text level.John MacFarlane
Previously we tried to do this at the Inline list level, but it makes more sense to intervene on breaking spaces at the Doc Text level.
2021-09-19Markdown writer: use `underline` class rather than `ul` for underline.John MacFarlane
This only affects output with bracketed_spans enabled. The markdown reader parses spans with either `.ul` or `.underline` as Underline elements, but we're moving towards preferring the latter.
2021-08-03Stop using the HTTP package. (#7456)mt_caret
We only depend on the urlEncode function in the package, which is also provided by http-types. The HTTP package also depends on the network package, which has difficulty building on ghcjs. Add internal module Text.Pandoc.Network.HTTP, exporting `urlEncode`.
2021-06-05CommonMark writer: do not throw away attributes when Ext_attributes is enabledJan Tojnar
Ext_attributes covers at least the following: - Ext_fenced_code_attributes - Ext_header_attributes - Ext_inline_code_attributes - Ext_link_attributes
2021-06-05Markdown writer: re-use functions from InlineJan Tojnar
Instead of duplicating linkAttributes and attrsToMarkdown, let’s just use those from the Inline module.
2021-05-16Markdown writer: fewer unneeded escapes for `#`.John MacFarlane
See #6259.
2021-05-16Markdown writer: improve escaping of `@`.John MacFarlane
We need to escape literal `@` before `{` because of the new citation syntax.
2021-05-13Implement curly-brace syntax for Markdown citation keys.John MacFarlane
The change provides a way to use citation keys that contain special characters not usable with the standard citation key syntax. Example: `@{foo_bar{x}'}` for the key `foo_bar{x}`. Closes #6026. The change requires adding a new parameter to the `citeKey` parser from Text.Pandoc.Parsing [API change]. Markdown reader: recognize @{..} syntax for citatinos. Markdown writer: use @{..} syntax for citations when needed. Update manual with curly-brace syntax for citations. Closes #6026.
2021-03-19Protect partial uses of maximum with NonEmpty.John MacFarlane
2021-03-02Split up T.P.Writers.Markdown...John MacFarlane
with T.P.Writers.Markdown.Types and T.P.Writers.Markdown.Inline. The module was difficult to compile on low-memory system.s