aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
AgeCommit message (Collapse)AuthorFilesLines
2020-07-19Add commonmark_x output format...John MacFarlane4-3/+34
commonmark with a number of useful extensions (more than gfm).
2020-07-19Trim down githubMarkdownExtensions.John MacFarlane1-9/+11
Previously it included all of the following, which make sense for the legacy markdown_github but not for gfm, since they are part of base commonmark and thus can't be turned off in gfm: - `Ext_all_symbols_escapable` - `Ext_backtick_code_blocks` - `Ext_fenced_code_blocks` - `Ext_space_in_atx_header` - `Ext_intraword_underscores` - `Ext_lists_without_preceding_blankline` - `Ext_shortcut_reference_links` ` These have been removed from `githubMarkdownExtensions`, though they're still turned on for legacy `markdown_github`.
2020-07-19Add generic `attributes` extension.John MacFarlane2-8/+3
This allows attributes to be added to any block or inline element, in principle. (Though in many cases this will be done by adding a Div or Span container, since pandoc's AST doesn't have a slot for attributes for most elements.) Currently this is only possible with the commonmark and gfm readers. Add `Ext_attributes` constructor for `Extension` [API change].
2020-07-19Use commonmark-hs to parse commonmark/gfm...John MacFarlane2-198/+57
...instead of cmark-gfm (a wrapper around a C library). We can now support many more pandoc extensions for commonmark and gfm. Add fenced_code_attributes to gfm/commonmark extensions.
2020-07-19Merge pull request #6495 from tarleb/html5-figure-accessiblityJohn MacFarlane1-2/+10
HTML writer: improve alt-text/caption handling for HTML5
2020-07-18DocBook reader: parse releaseinfo as metadata.John MacFarlane1-0/+1
Closes #6542. Note that you'll need to put releaseinfo somewhere in your template if you want this to be part of the converted output.
2020-07-17Jira writer: keep image caption as alt attributeAlbert Krewinkel1-10/+12
Fixes #6529
2020-07-14Docbook reader: remove misleading comment...John MacFarlane1-1/+1
suggesting that releaseinfo is handled. It isn't.
2020-07-13Merge pull request #6527 from lierdakil/fix-6514John MacFarlane3-55/+59
[Docx Reader] Only use bCs/iCs on runs with rtl or cs property
2020-07-13[Docx Reader] Only use bCs/iCs on runs with rtl or cs propertyNikolay Yakimov3-55/+59
Fixes #6514
2020-07-12Merge pull request #6513 from brisad/masterJohn MacFarlane1-1/+3
Escape starting periods in ms writer code blocks
2020-07-12Merge pull request #6509 from lierdakil/docx-smush-inlines-refactorJohn MacFarlane1-62/+39
[Docx Reader] Refactor/update Text.Pandoc.Readers.Docx.Combine.smushInlines
2020-07-12Ms writer: fix code highlighting with blank lines.John MacFarlane1-5/+5
Previously blank lines were simply omitted from highligted code.
2020-07-12RST reader: fix spurious newlines in some attributes from directives.John MacFarlane1-1/+2
2020-07-12RST reader: avoid extra newline in included code blocks.John MacFarlane1-2/+2
2020-07-08Escape starting periods in ms writer code blocksMichael Hoffmann1-1/+3
If a line of ms code block output starts with a period (.), it should be prepended by '\&' so that it is not interpreted as a roff command. Fixes #6505
2020-07-07[Docx Reader] Use null instead of isEmpty in Readers.Docx.CombineNikolay Yakimov1-9/+5
2020-07-07[Docx Reader] Remove unused LANGUAGE from Readers.Docx.CombineNikolay Yakimov1-2/+0
2020-07-07[Docx Reader] Remove no-op stack/unstackInlines in Readers.Docx.CombineNikolay Yakimov1-6/+4
2020-07-07[Docx Reader] Get rid of unused NullModifier in Readers.Docx.CombineNikolay Yakimov1-18/+15
2020-07-07[Docx Reader] Refactor/update smushInlinesNikolay Yakimov1-44/+32
2020-07-02Revert "Ipnyb: allow lossless round-tripping of markdown cell content."John MacFarlane2-7/+3
This reverts commit efbc2050315b60c8a753dee6255465f1083019ab.
2020-07-02Revert "Ipynb reader: fix duplication of 'source' attribute."John MacFarlane1-1/+1
This reverts commit 2d009366cef2358ec2c99612ae2c73068841306c.
2020-07-02Ipynb reader: fix duplication of 'source' attribute.John MacFarlane1-1/+1
See #5408.
2020-07-01HTML writer: improve alt-text/caption handling for HTML5Albert Krewinkel1-2/+10
Screen readers read an image's `alt` attribute and the figure caption, both of which come from the same source in pandoc. The figure caption is hidden from screen readers with the `aria-hidden` attribute. This improves accessibility. For HTML4, where `aria-hidden` is not allowed, pandoc still uses an empty `alt` attribute to avoid duplicate contents. Closes: #6491
2020-07-01Org reader: respect tables-excluding export settingAlbert Krewinkel3-2/+7
Tables can be removed from the final document with the `#+OPTION: |:nil` export setting.
2020-06-30Org reader: respect export setting disabling footnotesAlbert Krewinkel3-2/+7
Footnotes can be removed from the final document with the `#+OPTION: f:nil` export setting.
2020-06-30Ipnyb: allow lossless round-tripping of markdown cell content.John MacFarlane2-3/+7
The reader now parses the contents of the markdown cell to a Pandoc structure, but *also* stores the raw markdown in a `source` attribute on the cell Div. When we convert back to markdown, this attribute is stripped off and the original source is used. When we convert to other formats, the attribute is usually ignored (though it will come through in HTML as a `data-source` attribute, not unhelpfully). I'll note some potential drawbacks of this approach: - It makes it impossible to use pandoc to clean up or change the contents of markdown cells, e.g. going from `+smart` to `-smart`. - There may be formats where the addition of the `source` attribute is problematic. I can't think of any, though. Closes #5408.
2020-06-30Org reader: respect export setting which disables entitiesAlbert Krewinkel3-6/+16
MathML-like entities, e.g., `\alpha`, can be disabled with the `#+OPTION: e:nil` export setting.
2020-06-29Merge pull request #6328 from lierdakil/defaults-meta-parseJohn MacFarlane3-57/+45
Unify defaults metadata and markdown metadata parsers
2020-06-29Org reader: keep unknown keyword lines as raw orgAlbert Krewinkel2-2/+13
The lines of unknown keywords, like `#+SOMEWORD: value` are no longer read as metadata, but kept as raw `org` blocks. This ensures that more information is retained when round-tripping org-mode files; additionally, this change makes it possible to support non-standard org extensions via filters.
2020-06-29Org reader: unify keyword handlingAlbert Krewinkel1-75/+67
Handling of export settings and other keywords (like `#+LINK`) has been combined and unified.
2020-06-29Org reader: support LATEX_HEADER_EXTRA and HTML_HEAD_EXTRA settingsAlbert Krewinkel1-5/+9
These export settings are treated like their non-extra counterparts, i.e., the values are added to the `header-includes` metadata list.
2020-06-29Org reader: allow multiple #+SUBTITLE export settingsAlbert Krewinkel1-0/+1
The values of all lines are read as inlines and collected in the `subtitle` metadata field.
2020-06-29Clean up T.P.R.MetadataNikolay Yakimov2-41/+25
2020-06-29Handle errors in yamlToMetaNikolay Yakimov2-11/+9
2020-06-29Unify defaults and markdown metadata parsersNikolay Yakimov3-29/+35
2020-06-28Remove obsolete RelaxedPolyRec extension (#6487)Nikolay Yakimov5-7/+0
2020-06-28PDF: all verbose output now goes to stderr, not stdout.John MacFarlane1-21/+21
Closes #6483.
2020-06-28JATS reader: parse abstract element into metadata field of same name (#6482)Albert Krewinkel1-0/+9
Closes: #6480
2020-06-28Org reader: read `#+INSTITUTE` values as text with markupAlbert Krewinkel1-7/+13
The value is stored in the `institute` metadata field and used in the default beamer presentation template.
2020-06-28Org reader: update behavior of author, keywords export settingsAlbert Krewinkel1-19/+9
The behavior of the `#+AUTHOR` and `#+KEYWORD` export settings has changed: Org now allows multiple such lines and adds a space between the contents of each line. Pandoc now always parses these settings as meta inlines; setting values are no longer treated as comma-separated lists. Note that a Lua filter can be used to restore the previous behavior.
2020-06-28Org reader: refactor export setting handlingAlbert Krewinkel1-79/+67
2020-06-27Org reader: read description lines as inlinesAlbert Krewinkel1-10/+46
`#+DESCRIPTION` lines are treated as text with markup. If multiple such lines are given, then all lines are read and separated by soft linebreaks. Closes: #6485
2020-06-25Org reader: honor tex export optionAlbert Krewinkel4-30/+75
The `tex` export option can be set with `#+OPTION: tex:nil` and allows three settings: - `t` causes LaTeX fragments to be parsed as TeX or added as raw TeX, - `nil` removes all LaTeX fragments from the document, and - `verbatim` treats LaTeX as text. The default is `t`. Closes: #4070
2020-06-23Remove redundant pattern match in pptx writer.John MacFarlane1-3/+0
2020-06-23LaTeX reader: Retain the Div around tables with attributes.John MacFarlane1-1/+8
We'll need this to store table attributes until all writers are adjusted to react to attributes on the Table element.
2020-06-23Markdown reader: Don't require blank line after grid table.John MacFarlane1-2/+2
This fixes #6481, allowing grid tables to be enclosed in fenced divs with no intervening blank lines.
2020-06-22Handle native Underline in Powerpoint writer.John MacFarlane1-1/+1
(Instead of old Span with underline class. Spans with `underline` will no longer be rendered as underlined text.)
2020-06-22Use native Underline instead of Span in JiraJohn MacFarlane2-5/+2