aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Org/Meta.hs
AgeCommit message (Collapse)AuthorFilesLines
2021-08-03Stop using the HTTP package. (#7456)mt_caret1-2/+2
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-01-09Org reader: allow multiple pipe chars in todo sequencesAlbert Krewinkel1-4/+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 Krewinkel1-1/+1
2020-11-22Org reader: parse `#+LANGUAGE` into `lang` metadata fieldAlbert Krewinkel1-0/+2
Fixes: #6845
2020-06-29Org reader: keep unknown keyword lines as raw orgAlbert Krewinkel1-2/+2
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-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-03-22Finer grained imports of Text.Pandoc.Class submodules (#6203)Albert Krewinkel1-1/+1
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 Krewinkel1-2/+0
* 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 Krewinkel1-1/+1
* Update copyright year * Copyright: add notes for Lua and Jira modules
2019-11-12Switch to new pandoc-types and use Text instead of String [API change].despresc1-35/+37
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: omit, but warn about unknown export optionsAlbert Krewinkel1-1/+1
Unknown export options are properly ignored and omitted from the output.
2019-03-01Remove license boilerplate.John MacFarlane1-18/+0
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 Krewinkel1-2/+2
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.leungbk1-8/+16
2018-12-17Replace read with safeRead. Closes #5162.John MacFarlane1-1/+1
2018-10-22Add space after brace.leungbk1-1/+1
2018-10-05Org reader: fix behavior for successive calls of `#+EXCLUDE_TAGS`. (#4951)Brian Leung1-8/+11
Calling `#+EXCLUDE_TAGS` multiple times should preserve the status of the previously declared tags.
2018-10-05Org reader: Add partial support for `#+EXCLUDE_TAGS` option. (#4950)Brian Leung1-0/+11
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-05-07Use Data.Maybe.fromMaybeAlexander Krotov1-6/+3
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-02-21Org reader: allow changing emphasis syntaxAlbert Krewinkel1-0/+22
The characters allowed before and after emphasis can be configured via `#+pandoc-emphasis-pre` and `#+pandoc-emphasis-post`, respectively. This allows to change which strings are recognized as emphasized text on a per-document or even per-paragraph basis. The allowed characters must be given as (Haskell) string. #+pandoc-emphasis-pre: "-\t ('\"{" #+pandoc-emphasis-post: "-\t\n .,:!?;'\")}[" If the argument cannot be read as a string, the default value is restored. Closes: #4378
2018-01-05Update copyright notices to include 2018Albert Krewinkel1-2/+2
2017-06-03Improve code style in lua and org modulesAlbert Krewinkel1-5/+5
2017-06-03Org reader: apply hlint suggestionsAlbert Krewinkel1-5/+4
2017-05-31Org reader: recognize babel result blocks with attributesAlbert Krewinkel1-2/+4
Babel result blocks can have block attributes like captions and names. Result blocks with attributes were not recognized and were parsed as normal blocks without attributes. Fixes: #3706
2017-05-06Drop redundant import of sortAlbert Krewinkel1-1/+1
This was left in accidentally.
2017-05-06Org reader: support macrosAlbert Krewinkel1-1/+26
Closes: #3401
2017-04-30Org reader: Avoid creating nullMeta by applying setMeta directlyAlexander Krotov1-4/+1
2017-03-12Org reader: interpret more meta value as inlinesAlbert Krewinkel1-4/+9
The values of the following meta variables are now interpreted using org-markup instead of treating them as pure strings: - *keywords*: comma-separated list of inlines - *subtitle*: inline values - *nocite*: inline values; using it multiple times accumulates the values.
2017-03-04Stylish-haskell automatic formatting changes.John MacFarlane1-15/+15
2017-01-25Working on readers.Jesse Rosenthal1-22/+23
2017-01-19Org reader: allow short hand for single-line raw blocksAlbert Krewinkel1-4/+5
Single-line raw blocks can be given via `#+FORMAT: raw line`, where `FORMAT` must be one of `latex`, `beamer`, `html`, or `texinfo`. Closes: #3366
2016-10-30Org reader: add support for todo-markersAlbert Krewinkel1-4/+39
Headlines can have optional todo-markers which can be controlled via the `#+TODO`, `#+SEQ_TODO`, or `#+TYP_TODO` meta directive. Multiple such directives can be given, each adding a new set of recognized todo-markers. If no custom todo-markers are defined, the default `TODO` and `DONE` markers are used. Todo-markers are conceptually separate from headline text and are hence excluded when autogenerating headline IDs. The markers are rendered as spans and labelled with two classes: One class is the markers name, the other signals the todo-state of the marker (either `todo` or `done`).
2016-09-02Fix grouping of imports.Jesse Rosenthal1-1/+1
Some source files keep imports in tidy groups. Changing `Text.Pandoc.Compat.Monoid` to `Data.Monoid` could upset that. This restores tidiness.
2016-09-02Remove Compat.MonoidJesse Rosenthal1-1/+1
This was only necessary for GHC versions with base below 4.5 (i.e., ghc < 7.4).
2016-08-29Org reader: respect `creator` export optionAlbert Krewinkel1-4/+3
The `creator` option controls whether the creator meta-field should be included in the final markup. Setting `#+OPTIONS: creator:nil` will drop the creator field from the final meta-data output. Org-mode recognizes the special value `comment` for this field, causing the creator to be included in a comment. This is difficult to translate to Pandoc internals and is hence interpreted the same as other truish values (i.e. the meta field is kept if it's present).
2016-08-29Org reader: respect `email` export optionAlbert Krewinkel1-4/+4
The `email` option controls whether the email meta-field should be included in the final markup. Setting `#+OPTIONS: email:nil` will drop the email field from the final meta-data output.
2016-08-29Org reader: respect `author` export optionAlbert Krewinkel1-0/+17
The `author` option controls whether the author should be included in the final markup. Setting `#+OPTIONS: author:nil` will drop the author from the final meta-data output.
2016-08-29Org reader: read HTML_head as header-includesAlbert Krewinkel1-0/+2
HTML-specific head content can be defined in `#+HTML_head` lines. They are parsed as format-specific inlines to ensure that they will only show up in HTML output.
2016-08-29Org reader: set classoption meta from LaTeX_class_optionsAlbert Krewinkel1-1/+8
2016-08-29Org reader: set documentclass meta from LaTeX_classAlbert Krewinkel1-0/+1
2016-08-29Org reader: read LaTeX_header as header-includesAlbert Krewinkel1-9/+31
LaTeX-specific header commands can be defined in `#+LaTeX_header` lines. They are parsed as format-specific inlines to ensure that they will only show up in LaTeX output.
2016-08-29Org reader: give precedence to later meta linesAlbert Krewinkel1-1/+1
The last meta-line of any given type is the significant line. Previously the value of the first line was kept, even if more lines of the same type were encounterd.
2016-08-29Org reader: allow multiple, comma-separated authorsAlbert Krewinkel1-1/+9
Multiple authors can be specified in the `#+AUTHOR` meta line if they are given as a comma-separated list.