aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers/Org
AgeCommit message (Collapse)AuthorFilesLines
2021-10-22Org reader: allow an initial :PROPERTIES: drawer to add to metadata.John MacFarlane1-1/+1
Closes #7520.
2021-02-18Org reader: fix bug in org-ref citation parsing.Albert Krewinkel1-0/+40
The org-ref syntax allows to list multiple citations separated by comma. This fixes a bug that accepted commas as part of the citation id, so all citation lists were parsed as one single citation. Fixes: #7101
2021-02-13Org: support task_lists extensionAlbert Krewinkel1-0/+13
The tasks lists extension is now supported by the org reader and writer; the extension is turned on by default. Closes: #6336
2021-02-07Avoid unnecessary use of NoImplicitPrelude pragma (#7089)Albert Krewinkel13-26/+0
2021-01-09Org reader: allow multiple pipe chars in todo sequencesAlbert Krewinkel1-0/+10
Additional pipe chars, used to separate "action" state from "no further action" states, are ignored. E.g., for the following sequence, both `DONE` and `FINISHED` are states with no further action required. #+TODO: UNFINISHED | DONE | FINISHED Previously, parsing of the todo sequence failed if multiple pipe chars were included. Closes: #7014
2021-01-08Update copyright notices for 2021 (#7012)Albert Krewinkel13-13/+13
2021-01-03Org reader: mark verbatim code with class "verbatim". (#6998)Dimitri Sabadie1-2/+2
* Replace org-mode’s verbatim from code to codeWith. This adds the `"verbatim"` class so that exporters can apply a specific style on it. For instance, it will be possible for HTML to add a CSS rule for code + verbatim class. * Alter test for org-mode’s verbatim change. See previous commit for further detail on the new implementation.
2021-01-01Org reader: restructure output of captioned code blocksAlbert Krewinkel1-3/+3
The Div wrapper of code blocks with captions now has the class "captioned-content". The caption itself is added as a Plain block inside a Div of class "caption". This makes it easier to write filters which match on captioned code blocks. Existing filters will need to be updated. Closes: #6977
2020-12-05Org reader: preserve targets of spurious linksAlbert Krewinkel1-2/+4
Links with (internal) targets that the reader doesn't know about are converted into emphasized text. Information on the link target is now preserved by wrapping the text in a Span of class `spurious-link`, with an attribute `target` set to the link's original target. This allows to recover and fix broken or unknown links with filters. See: #6916
2020-11-22Org reader: parse `#+LANGUAGE` into `lang` metadata fieldAlbert Krewinkel1-0/+4
Fixes: #6845
2020-11-18Replace org #+KEYWORDS with #+keywordsTEC7-92/+92
As of ~2 years ago, lower case keywords became the standard (though they are handled case insensitive, as always): https://code.orgmode.org/bzg/org-mode/commit/13424336a6f30c50952d291e7a82906c1210daf0 Upper case keywords are exclusive to the manual: - https://orgmode.org/list/871s50zn6p.fsf@nicolasgoaziou.fr/ - https://orgmode.org/list/87tuuw3n15.fsf@nicolasgoaziou.fr/
2020-10-14Fix remaining typos in testsAlbert Krewinkel1-1/+1
See: #6738
2020-09-13Fix hlint suggestions, update hlint.yaml (#6680)Christian Despres2-2/+2
* Fix hlint suggestions, update hlint.yaml Most suggestions were redundant brackets. Some required LambdaCase. The .hlint.yaml file had a small typo, and didn't ignore camelCase suggestions in certain modules.
2020-07-01Org reader: respect tables-excluding export settingAlbert Krewinkel1-0/+8
Tables can be removed from the final document with the `#+OPTION: |:nil` export setting.
2020-06-30Org reader: respect export setting disabling footnotesAlbert Krewinkel1-0/+16
Footnotes can be removed from the final document with the `#+OPTION: f:nil` export setting.
2020-06-30Org reader: respect export setting which disables entitiesAlbert Krewinkel1-0/+6
MathML-like entities, e.g., `\alpha`, can be disabled with the `#+OPTION: e:nil` export setting.
2020-06-29Org reader: keep unknown keyword lines as raw orgAlbert Krewinkel1-2/+5
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-48/+56
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-29/+49
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/+7
The values of all lines are read as inlines and collected in the `subtitle` metadata field.
2020-06-28Org reader: read `#+INSTITUTE` values as text with markupAlbert Krewinkel1-0/+4
The value is stored in the `institute` metadata field and used in the default beamer presentation template.
2020-06-28Org tests: group export settings test for Org readerAlbert Krewinkel1-74/+79
2020-06-28Org reader: update behavior of author, keywords export settingsAlbert Krewinkel1-20/+35
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-27Org reader: read description lines as inlinesAlbert Krewinkel1-5/+17
`#+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 Krewinkel1-0/+73
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-20Recognize images with uppercase extensionsAlbert Krewinkel1-0/+4
Fixes: #6472
2020-04-28Support new Underline element in readers and writers (#6277)Vaibhav Sagar1-2/+1
Deprecate `underlineSpan` in Shared in favor of `Text.Pandoc.Builder.underline`.
2020-04-15Use the new builders, modify readers to preserve empty headersdespresc1-20/+36
The Builder.simpleTable now only adds a row to the TableHead when the given header row is not null. This uncovered an inconsistency in the readers: some would unconditionally emit a header filled with empty cells, even if the header was not present. Now every reader has the conditional behaviour. Only the XWiki writer depended on the header row being always present; it now pads its head as necessary.
2020-04-15Adapt to the newest Table type, fix some previous adaptation issuesdespresc1-4/+6
- Writers.Native is now adapted to the new Table type. - Inline captions should now be conditionally wrapped in a Plain, not a Para block. - The toLegacyTable function now lives in Writers.Shared.
2020-04-15Implement the new Table typedespresc1-4/+4
2020-03-13Update copyright year (#6186)Albert Krewinkel13-13/+13
* Update copyright year * Copyright: add notes for Lua and Jira modules
2020-02-07Apply linter suggestions. Add fix_spacing to lint target in Makefile.John MacFarlane1-1/+1
2019-12-19Org reader: fix parsing problem for colons in headlineAlbert Krewinkel1-0/+10
Fixed a problem where words surrounded by colons could causing parse failures in some cases when they occurred in headers. Fixes: #5993
2019-12-18Org reader: wrap named table in div, using name as idAlbert Krewinkel1-0/+7
Closes: #5984
2019-11-12Switch to new pandoc-types and use Text instead of String [API change].despresc3-10/+11
PR #5884. + Use pandoc-types 1.20 and texmath 0.12. + Text is now used instead of String, with a few exceptions. + In the MediaBag module, some of the types using Strings were switched to use FilePath instead (not Text). + In the Parsing module, new parsers `manyChar`, `many1Char`, `manyTillChar`, `many1TillChar`, `many1Till`, `manyUntil`, `mantyUntilChar` have been added: these are like their unsuffixed counterparts but pack some or all of their output. + `glob` in Text.Pandoc.Class still takes String since it seems to be intended as an interface to Glob, which uses strings. It seems to be used only once in the package, in the EPUB writer, so that is not hard to change.
2019-10-27Org reader: fix parsing of empty comment linesAlbert Krewinkel1-1/+11
Comment lines in Org-mode can be completely empty; both of these line should produce no output: # a comment # The reader used to produce a wrong result for the latter, but ignores that line as well now. Fixes: #5856
2019-07-22Org reader: accept ATTR_LATEX in block attributesAlbert Krewinkel1-0/+7
Attributes for LaTeX output are accepted as valid block attributes; however, their values are ignored. Fixes: #5648
2019-05-13Org reader: fix planning elements in headers level 3 and higherAlbert Krewinkel1-0/+24
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 Krewinkel1-0/+18
Unknown export options are properly ignored and omitted from the output.
2019-05-05Org reader: prefer plain symbols over math symbolsAlbert Krewinkel1-3/+7
Symbols like `\alpha` are output plain and unemphasized, not as math. Fixes: #5483
2019-05-05Org reader: recognize emphasis after TODO/DONE keywordAlbert Krewinkel1-0/+7
Fixes: #5484
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel13-0/+143
Quite a few modules were missing copyright notices. This commit adds copyright notices everywhere via haddock module headers. The old license boilerplate comment is redundant with this and has been removed. Update copyright years to 2019. Closes #4592.
2019-01-07Org reader: handle `minlevel` option differently. (#5190)Brian Leung1-1/+6
When `minlevel` exceeds the original minimum level observed in the file to be included, every heading should be shifted rightward.
2019-01-01Org reader: fix self-link parsing regressionAlbert Krewinkel1-0/+4
Fixes a regression introduced by the previous commit.
2019-01-01Org reader: fix treatment of links to imagesAlbert Krewinkel1-13/+17
Links with descriptions which are pointing to images are no longer read as inline images, but as proper links. Fixes: #5191
2018-09-28Parse empty argument array in inline src blocks.leungbk1-0/+7
`enclosedByPair` alone does not the handle the empty array properly since it uses `many1Till`.
2018-09-06Org reader: respect export option `p` for planning infoAlbert Krewinkel2-0/+36
Inclusion of planning info (*DEADLINE*, *SCHEDULED*, and *CLOSED*) can be controlled via the `p` export option: setting the option to `t` will add all planning information in a *Plain* block below the respective headline.
2018-09-05Org reader: strip planning info from outputAlbert Krewinkel1-0/+25
Planning info is parsed, but not included in the output (as is the default with Emacs Org-mode). Fixes: #4867
2018-07-23Org reader: fix parsers relying on parseFromStringAlbert Krewinkel1-0/+11
Emphasis was not parsed when it followed directly after some block types (e.g., lists). The org reader uses a wrapper for the `parseFromString` function to handle org-specific state. The last position of a character allowed before emphasis was reset incorrectly in this wrapper. Emphasized text was not recognized when placed directly behind a block which the reader parses using `parseFromString`. Fixes: #4784
2018-07-02More spellcheckAlexander Krotov1-1/+1