summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Org/DocumentTree.hs
AgeCommit message (Collapse)Author
2023-01-10Update copyright years, it's 2023!Albert Krewinkel
2022-02-06Org reader: allow comments above property drawerLucas V. R
The Org Manual page at https://orgmode.org/manual/Property-Syntax.html says (as of 2022-02-03): "Property blocks defined before first headline needs to be located at the top of the buffer, allowing only comments above." This commit allows comments above.
2022-02-06Org reader: allow ":" in property drawer keysLucas V. R
Any non-space character is allowed as property drawer key, including ":" itself (so it is not really a delimiter). The real delimiter is a space character, so in a drawer like :PROPERTIES: ::k:ey:: value :END: ":k:ey:" is a key with value "value". This usage can be seen in the Org Manual at https://orgmode.org/manual/Using-Header-Arguments.html, where the Org snippet * Heading :PROPERTIES: :header-args:clojure: :session *clojure-1* :header-args:R: :session *R* :END: is listed as an example.
2022-01-02Copyright notices: update for 2022Albert Krewinkel
2021-10-22Org reader: allow an initial :PROPERTIES: drawer to add to metadata.John MacFarlane
Closes #7520.
2021-01-08Update copyright notices for 2021 (#7012)Albert Krewinkel
2020-03-22Finer grained imports of Text.Pandoc.Class submodules (#6203)Albert Krewinkel
This should speed-up recompilation after changes in `Text.Pandoc.Class`, as the number of modules affected by a change will be smaller in general. It also offers faster insights into the parts of `T.P.Class` used within a module.
2020-03-15Use implicit Prelude (#6187)Albert Krewinkel
* Use implicit Prelude The previous behavior was introduced as a fix for #4464. It seems that this change alone did not fix the issue, and `stack ghci` and `cabal repl` only work with GHC 8.4.1 or newer, as no custom Prelude is loaded for these versions. Given this, it seems cleaner to revert to the implicit Prelude. * PandocMonad: remove outdated check for base version Only base versions 4.9 and later are supported, the check for `MIN_VERSION_base(4,8,0)` is therefore unnecessary. * Always use custom prelude Previously, the custom prelude was used only with older GHC versions, as a workaround for problems with ghci. The ghci problems are resolved by replacing package `base` with `base-noprelude`, allowing for consistent use of the custom prelude across all GHC versions.
2020-03-13Update copyright year (#6186)Albert Krewinkel
* Update copyright year * Copyright: add notes for Lua and Jira modules
2019-12-19Org reader: fix parsing problem for colons in headlineAlbert Krewinkel
Fixed a problem where words surrounded by colons could causing parse failures in some cases when they occurred in headers. Fixes: #5993
2019-11-12Switch to new pandoc-types and use Text instead of String [API change].despresc
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-05-13Org reader: fix planning elements in headers level 3 and higherAlbert Krewinkel
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-05Org reader: recognize emphasis after TODO/DONE keywordAlbert Krewinkel
Fixes: #5484
2019-03-01Remove license boilerplate.John MacFarlane
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel
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-30Org reader: add support for #+SELECT_TAGS.leungbk
2019-01-30Org reader: separate filtering logic from conversion function.leungbk
2018-10-05Org reader: Add partial support for `#+EXCLUDE_TAGS` option. (#4950)Brian Leung
Closes #4284. Headers with the corresponding tags should not appear in the output. If one or more of the specified tags contains a non-tag character like `+`, Org-mode will not treat that as a valid tag, but will nonetheless continue scanning for valid tags. That behavior is not replicated in this patch; entering `cat+dog` as one of the entries in `#+EXCLUDE_TAGS` and running the file through Pandoc will cause the parser to fail and result in the only excluded tag being the default, `noexport`.
2018-10-04Add lookupMeta* functions to Text.Pandoc.Writers.Shared (#4907)Mauro Bieg
Remove exported functions `metaValueToInlines`, `metaValueToString`. Add new exported functions `lookupMetaBool`, `lookupMetaBlocks`, `lookupMetaInlines`, `lookupMetaString`. Use these whenever possible for uniformity in writers. API change (major, because of removed function `metaValueToInlines`. `metaValueToString` wasn't in any released version.)
2018-09-06Org reader: respect export option `p` for planning infoAlbert Krewinkel
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-06Org reader internals: disable some GHC extensionsAlbert Krewinkel
The RecordWildCards and ViewPatterns language extensions can be used to shorten code, but usually also makes it harder to read. The DocumentTree module was hence refactored and no longer relies on these extensions.
2018-09-05Org reader: strip planning info from outputAlbert Krewinkel
Planning info is parsed, but not included in the output (as is the default with Emacs Org-mode). Fixes: #4867
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-03-16Monoid/Semiground cleanup relying on custom Prelude.John MacFarlane
2018-03-15Remove redundant import.John MacFarlane
2018-03-13Require pandoc-types 1.17.4.John MacFarlane
And a few tweaks related to the Semigroups/Monoid change. Closes #4448.
2018-01-05Update copyright notices to include 2018Albert Krewinkel
2017-08-09Org reader: use tag-name attribute instead of data-tag-name.John MacFarlane
2017-06-03Improve code style in lua and org modulesAlbert Krewinkel
2017-06-03Org reader: apply hlint suggestionsAlbert Krewinkel
2017-05-31Org reader: respect export option for tagsAlbert Krewinkel
Tags are appended to headlines by default, but will be omitted when the `tags` export option is set to nil. Closes: #3713
2017-05-31Org reader: include tags in headlinesAlbert Krewinkel
The Emacs default is to include tags in the headline when exporting. Instead of just empty spans, which contain the tag name as attribute, tags are rendered as small caps and wrapped in those spans. Non-breaking spaces serve as separators for multiple tags.
2017-05-27Org reader: subject full doc tree to headline transformationsAlbert Krewinkel
Emacs parses org documents into a tree structure, which is then post-processed during exporting. The reader is changed to do the same, turning the document into a single tree of headlines starting at levelĀ 0. Fixes: #3695
2017-05-16Org reader: replace `sequence . map` with `mapM`Albert Krewinkel
2017-05-16Org reader: put tree parsing code into dedicated moduleAlbert Krewinkel