aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
AgeCommit message (Collapse)AuthorFilesLines
2019-06-11JATS writer: don't use break element for LineBreak.John MacFarlane1-1/+2
It's only allowed in a few special contexts, and not in p elements.
2019-06-11JATS writer: wrap elements with p when needed.John MacFarlane1-5/+43
The JATS spec restricts contents of certain elements (fn, list-item); this patch wraps elements that can't go in these contexts inside p elements with specific-use "wrapper", so the documents will conform. Closes #5570.
2019-06-10LaTeX writer: Use mbox to get proper behavior inside `\sout`.John MacFarlane1-6/+6
Closes #5529.
2019-06-10Asciidoc writer: use doubled ## when necessary for spans.John MacFarlane1-1/+3
Closes #5566.
2019-06-10Asciidoc writer: ensure correct nesting strong/emph.John MacFarlane1-0/+2
Closes #5565.
2019-06-09DocBook reader: Issue IgnoredElement warnings.John MacFarlane1-28/+37
2019-06-09FB2 reader: skip unknown elements rather than throwing errors.John MacFarlane1-20/+39
Sometimes custom elements are used, and the reader should not abort but skip them with a warning. (For example, id element in author.) Closes #5560.
2019-06-09Logging: Added IgnoredElement constructor for LogMessage.John MacFarlane1-0/+6
SkippedContent doesn't work for some of the XML-based readers, which don't have access to source positions.
2019-06-08Roll back automatic figure/table numbering in ODT/OpenDocument.John MacFarlane1-2/+11
This was added in pandoc 2.7.2, but it makes it impossible to use pandoc-crossref. So this has been rolled back for now, until we find a good solution to make this behavior optional (or a creative way to let pandoc-crossref and this feature to coexist). See #5474.
2019-06-08LaTeX reader: pass through unknown listings language as class.John MacFarlane1-7/+13
Previously if the language was not in the list of listings- supported languages, it would not be added as a class, so custom syntax highlighting could not be used. Closes #5540.
2019-06-08PDF via ms: make TOC appear at beginning and in PDF bookmarks.John MacFarlane1-2/+2
Previously the TOC appeared at the end of the document, and was not bookmarked. If you want it to continue appearing at the end, add `--pdf-engine-opt=--no-toc-relocation` to your command line. Closes #5553.
2019-06-07LaTeX writer: Include inline code attributes with `--listings`.John MacFarlane1-4/+12
Closes #5420.
2019-06-05Add jira writer (#5548)Albert Krewinkel2-0/+325
This adds support for Atlassian's jira markup. Closes #2497
2019-06-04Include trailing {}s in raw latex commands.John MacFarlane1-2/+7
Change is in rawLaTeXInline in LaTeX reader, but it affects the markdown reader and other readers that allow raw LaTeX. Previously, trailing `{}` would be included for unknown commands, but not for known commands. However, they are sometimes used to avoid a trailing space after the command. The chances that a `{}` after a LaTeX command is not part of the command are very small. Closes #5439.
2019-06-04Docx reader: Add support for w:rtl (ltr annotation).John MacFarlane2-4/+19
Closes #5545.
2019-06-04Fix document section assignments in EPUB writer.John MacFarlane1-4/+7
For example, introduction should go in bodymatter, not frontmatter, and epigraph, conclusion, and afterward should go in bodymatter, not backmatter. For the full list of assignments, see the manual. Closes #5546.
2019-06-04Markdown reader: don't create implicit reference for empty header.John MacFarlane1-4/+7
Closes #5549.
2019-06-03Avoid unwanted interpretation of def list term as other kind of block,John MacFarlane1-4/+4
e.g. ordered list item, in Markdown writer. Closes #554.
2019-06-01Textile writer: fix closing tag for math outputAlbert Krewinkel1-1/+1
Opening and closing tag for math output match now.
2019-05-30Add unicode code point in "Missing character" warning.John MacFarlane1-1/+8
If the character isn't in the console font, the message is pretty useless, so we show the code point for anything non-ASCII. Closes #5538.
2019-05-29pandoc.mediabag module: add function `delete`Albert Krewinkel2-1/+16
Function `pandoc.mediabag.delete` allows to remove a single item of the given name from the media bag.
2019-05-29pandoc.mediabag module: add function `empty`Albert Krewinkel1-0/+6
Function `pandoc.mediabag.empty` was added. It allows to clean-out the media bag, removing all entries.
2019-05-29pandoc.mediabag module: add items function iterating over mediabagAlbert Krewinkel3-1/+88
A new function `pandoc.mediabag.items` was added to Lua module pandoc.mediabag. This allows users to lazily iterate over all media bag items, loading items into Lua one-by-one. Example: for filename, mime_type, content in pandoc.mediabag.items() do -- use media bag item. end This is a convenient alternative to using `mediabag.list` in combination with `mediabag.lookup`.
2019-05-29Lua Version type: shorten "version too old" messageAlbert Krewinkel1-1/+1
2019-05-29Merge pull request #5526 from tarleb/richer-version-typeJohn MacFarlane6-3/+189
Lua: add Version type to simplify comparisons
2019-05-29Merge pull request #5497 from mb21/html-writer-video-audioJohn MacFarlane2-34/+37
Output HTML5 video and audio elements
2019-05-29HTML reader: misc. epub related fixes.John MacFarlane1-30/+41
- With epub extensions, check for epub:type in addition to type. - Fix problem with noteref parsing which caused block-level content to be eaten with the noteref. - Rename pAnyTag to pAny. - Refactor note resolution.
2019-05-29Lua: add Version type to simplify comparisonsAlbert Krewinkel6-3/+189
Version specifiers like `PANDOC_VERSION` and `PANDOC_API_VERSION` are turned into `Version` objects. The objects simplify version-appropriate comparisons while maintaining backward-compatibility. A function `pandoc.types.Version` is added as part of the newly introduced module `pandoc.types`, allowing users to create version objects in scripts.
2019-05-29HTML writer: output video and audio elementsmb212-32/+28
depending on file extension of the image path
2019-05-29Text.Pandoc.MIME: add mediaCategory [API change]mb211-2/+9
2019-05-28HTML writer: emit empty alt tag in figures (#5518)Mauro Bieg1-1/+1
The same text is already in the <figcaption> and screen-readers would read it twice, see #4737
2019-05-28Fix handling of `file:` URL scheme in `downloadOrRead` (#5522)Mauro Bieg1-2/+2
Move up the pattern match to be reachable, closes #5517. Previously `file:/` URLs were handled wrongly and pandoc attempted to make HTTP requests, which failed.
2019-05-27EPUB writer: don't include 'landmarks' if there aren't any.John MacFarlane1-9/+10
Previously we could get an empty ol element, which caused validation errors with epubcheck.
2019-05-27consolidate simple-table detection (#5524)Mauro Bieg5-41/+23
add `onlySimpleTableCells` to `Text.Pandoc.Shared` [API change] This fixes an inconsistency in the HTML reader, which did not treat tables with `<p>` inside cells as simple.
2019-05-25Muse reader: allow images inside link descriptionsAlexander Krotov1-5/+4
2019-05-25HTML reader: trim definition list termsAlexander Krotov1-1/+1
2019-05-25Muse writer: do not escape empty line after <br>Alexander Krotov1-4/+5
2019-05-22Markdown writer: Ensure the code fence is long enough.John MacFarlane1-11/+10
Previously too few backticks were used when the code block contained an indented line of backticks. (Ditto tildes.) Cloess #5519.
2019-05-21Markdown writer: fix small error in ed73bd28Jesse Rosenthal1-4/+3
A `do` notation was left in a non-monadic function.
2019-05-21Markdown writer: Handle labels with integer namesJesse Rosenthal1-3/+20
Previously if labels had integer names, it could produce a conflict with auto-labeled reference links. Now we test for a conflict and find the next available integer. Note that this involves adding a new state variable `stPrevRefs` to keep track of refs used in other document parts when using `--reference-location=block|section` Closes #5495
2019-05-18Add tex_math_dollars to multimarkdownExtensions.John MacFarlane1-0/+1
This form is now supported in multimarkdown, in addition to `tex_math_double_backslash`. See #5512.
2019-05-16JATS writer: properly handle footnotes.John MacFarlane1-7/+24
"Best Practice: When footnotes are grouped at the end of an article, wrap them in a `<fn-group>` and use an `<xref>` element in the text, as usual, to tie each footnote in the list to a particular location in the text." Closes #5511.
2019-05-15FB2 writer: do not wrap note references into <sup> and bracketsAlexander Krotov1-1/+1
Existing FB2 readers, such as FBReader, already display links with type="note" as a superscript.
2019-05-15hlint FB2 writerAlexander Krotov1-27/+22
2019-05-13Org reader: fix planning elements in headers level 3 and higherAlbert Krewinkel1-1/+1
Planning info is now always placed before the subtree contents. Previously, the planning info was placed after the content if the header's subtree was converted to a list, which happens with headers of level 3 and higher per default. Fixes: #5494
2019-05-13Org reader: omit, but warn about unknown export optionsAlbert Krewinkel3-4/+20
Unknown export options are properly ignored and omitted from the output.
2019-05-12Org writer: always indent src blocks content by 2 spacesAlbert Krewinkel1-3/+1
Emacs always uses two spaces when indenting the content of src blocks, e.g., when exiting a `C-c '` edit-buffer. Pandoc used to indent contents by the space-equivalent of one tab, but now always uses two spaces, too. Closes: #5440
2019-05-11FB2 reader: parse notesAlexander Krotov1-3/+51
Closes #5493
2019-05-11FB2 reader: use XML.Light.Input.parseXMLDoc to parse the root elementAlexander Krotov1-12/+11
2019-05-11Reduce the amount of state in FB2 readerAlexander Krotov1-1/+3