Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
Reading of smart quotes can be toggled using the `'` option.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
Org reader: support org-ref style citations
|
|
Org export blocks
|
|
Closes #2953.
|
|
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.
|
|
- 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.
|
|
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.
|
|
The *org-ref* package is an org-mode extension commonly used to manage
citations in org documents. Basic support for the `cite:citeKey` and
`[[cite:citeKey][prefix text::suffix text]]` syntax is added.
|
|
Org-mode reader modularization
|
|
Block parsing code is moved to a separate module.
This is part of the Org-mode reader cleanup effort.
|
|
Inline parsing code is moved to a separate module. Parsers for block
starts are extracted as well, as those are used in the `endline` parser.
This is part of the Org-mode reader cleanup effort.
|
|
The Org-mode reader uses many functions defined in the
`Text.Pandoc.Parsing` utility module. Some of the functions are
overwritten with versions adapted to Org-mode idiosyncrasies. These
special functions, as well as the normal Pandoc versions, are combined
in a single module to increase the ease of use.
This leads to decoupling of Org-mode and Pandoc and hence to slightly
cleaner code. The downside is code-bloat due to repeated import/export
statements.
|
|
EPUB Reader: normalise Link id as well
|
|
|
|
|
|
|
|
Org drawer improvements
|
|
For the implementation of the Drawer element in the Org Writer, we make
use of a generic Block container with attributes. The presence of a
`drawer` class defines that the `Div` constructor is a drawer. The first
class defines the drawer name to use. The key-value list in the
attributes defines the keys to add inside the Drawer. Lastly, the list
of Block elements contains miscellaneous blocks elements to add inside
of the Drawer.
Signed-off-by: Albert Krewinkel <albert@zeitkraut.de>
|
|
The `d` export option can be used to control which drawers are exported
and which are discarded. Basic support for this option is added here.
|
|
The `ID` property is reserved for internal use by Org-mode and should
not be used. The `CUSTOM_ID` property is to be used instead, it is
converted to the `ID` property for certain export format.
The reader and writer erroneously used `ID`. This is corrected by using
`CUSTOM_ID` where appropriate.
|
|
|
|
This caused exponential parsing behavior in documnets
with unclosed tags in dl, dd, dt.
|
|
Org properties drawer
|
|
This allows header attributes to be added to org documents in the form
of `:PROPERTIES:` drawers. All available attributes are stored as
key/value pairs. This reflects the way the org reader handles
`:PROPERTIES:` blocks.
This closes #1962.
|
|
Headers can have optional `:PROPERTIES:` drawers associated with them.
These drawers contain key/value pairs like the header's `id`. The
reader adds all listed pairs to the header's attributes; `id` and
`class` attributes are handled specially to match the way `Attr` are
defined.
This also changes behavior of how drawers of unknown type are handled.
Instead of including all unknown drawers, those are not read/exported,
thereby matching current Emacs behavior.
This closes #1877.
|
|
|
|
Needed for correct polyglossia operation with Cyrillic fonts and perhaps
can find some other usages. Example usage in YAML metadata:
```
fontfamilies:
- name: \cyrillicfont
font: Liberation Serif
- name: \cyrillicfonttt
options: Scale=MatchLowercase
font: Liberation
```
(vladipus)
|
|
Org reader support for ATTR_HTML statements
|
|
Arbitrary key-value pairs can be added to some block types using a
`#+ATTR_HTML` line before the block. Emacs Org-mode only includes these
when exporting to HTML, but since we cannot make this distinction here,
the attributes are always added.
The functionality is now supported for figures.
This closes #1906.
|
|
Additional state changes need to be made after a newline is parsed,
otherwise markup may not be recognized correctly.
This fixes a bug where markup after certain block-types would not be
recognized. E.g. `/emph/` in the following snippet was not parsed as
emphasized.
foo
# comment
/emph/
|
|
A parser state attribute was used to keep track of block attributes
defined in meta-lines. Global state is undesirable, so block attributes
are no longer saved as part of the parser state. Old functions and the
respective part of the parser state are removed.
|
|
This should fix #2924.
Testing on the epub that caused the problem originally
would be welcome.
|
|
Previously they were escaped as ux5f.
Closes #2921.
|
|
|
|
This reverts commit 285bbf61cf2b21278792e48aee7c25fa0ee62faa.
|
|
This reverts commit ee45be5723ef6001ae333110ce45ae2f7b1b17af.
|
|
This reverts commit 07a4320ba97cdd219e5cbb18f21dbbda00bc5543.
|