aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Org/Blocks.hs
AgeCommit message (Collapse)AuthorFilesLines
2016-06-26Org reader: support figure labelsAlbert Krewinkel1-1/+6
Figure labels given as `#+LABEL: thelabel` are used as the ID of the respective image. This allows e.g. the LaTeX to add proper `\label` markup. This fixes half of #2496 and #2999.
2016-06-21Org reader: remove partial functionsAlbert Krewinkel1-2/+4
Partial functions like `head` lead to avoidable errors and should be avoided. They are replaced with total functions. This fixes #2991.
2016-06-03Org reader: support special strings export optionAlbert Krewinkel1-1/+1
Parsing of special strings (like '...' as ellipsis or '--' as en dash) can be toggled using the `-` option.
2016-06-03Org reader: support emphasized text export optionAlbert Krewinkel1-1/+1
Parsing of emphasized text can be toggled using the `*` option. This influences parsing of text marked as emphasized, strong, strikeout, and underline. Parsing of inline math, code, and verbatim text is not affected by this option.
2016-06-03Org reader: support smart quotes export optionAlbert Krewinkel1-1/+1
Reading of smart quotes can be toggled using the `'` option.
2016-06-02Org reader: drop unused field from parser stateAlbert Krewinkel1-6/+5
The `OrgParserState` contained both an `orgStateMeta` and `orgStateMeta'` field, the former for plain meta information and the latter for F-monad wrapped meta info. The plain meta info is only used to make `OrgParserState` an instance of the `HasMeta` class, which in turn is never used in the reader. The (F Meta) version is hence renamed to the "un-primed" version while the other one is dropped.
2016-06-02Org reader: undo code duplicationAlbert Krewinkel1-21/+3
Some code was duplicated (copy-pasted) or placed in an inappropriate module during the modularization refactoring. Those functions are moved into a `Shared` module, as was originally intended but forgotten. Better documentation of the respective functions is a positive side-effect.
2016-05-29Org reader: support new syntax for export blocksAlbert Krewinkel1-0/+9
Org-mode version 9 usees a new syntax for export blocks. Instead of `#+BEGIN_<FORMAT>`, where `<FORMAT>` is the format of the block's content, the new format uses `#+BEGIN_export <FORMAT>` instead. Both types are supported.
2016-05-29Org reader: refactor BEGIN…END block parsingAlbert Krewinkel1-111/+131
- Reorder functions, grouping related functions together. - Demote simple functions to local functions if they are used just once. - Rename and document functions to increase code readability. - Fix handling of whitespace in blocks, allowing content to be indented less then the block header.
2016-05-29Org reader: rename `parseInlines` to `inlines`Albert Krewinkel1-7/+7
Having a function starting with `parse` in a parsing library is overly redundant. Let's use a nicer, shorter name more in line with the rest of the library.
2016-05-25Org reader: extract blocks parser to moduleAlbert Krewinkel1-0/+891
Block parsing code is moved to a separate module. This is part of the Org-mode reader cleanup effort.