Age | Commit message (Collapse) | Author | Files | Lines |
|
Org linebreaks
|
|
Org reader: Add support for figures
|
|
This relies on Template Haskell, which causes problems in Windows
due to libraries with C dependencies. We need to avoid using TH
in pandoc code.
|
|
Linebreaks are marked by the string `\\` at the end of a line.
|
|
Support for figures (images with name and caption) is added.
|
|
Previously these were treated as inline, and included in paragraph
tags in HTML or DocBook output, which is generally not what is wanted.
Closes #1233.
|
|
This fixes the org-reader's handling of sub- and superscript
expressions. Simple expressions (like `2^+10`), expressions in
parentheses (`a_(n+1)`) and nested sexp (like `a_(nested()parens)`) are
now read correctly.
|
|
Closes #1230.
|
|
HLint's recommendations for better code are applied to the Org-mode
reader code.
|
|
Support all of the following variants as valid ways to define inline or
display math inlines:
- `\[..\]` (display)
- `$$..$$` (display)
- `\(..\)` (inline)
- `$..$` (inline)
This closes #1223. Again.
|
|
Org reader: Precise rules for the recognition of markup
|
|
The inline parsers have been rewritten using the org source code as a
reference. This fixes a couple of bugs related to erroneous markup
recognition.
|
|
In particular we now pick up on attributes. Since pandoc links
can't have attributes, we enclose the whole link in a span
if there are attributes.
Closes #1008.
|
|
Org reader: Read inline math, recognize definition lists
|
|
Closes #1223.
|
|
The length is not actually recorded, but at least we get a table.
Closes #1180.
|
|
|
|
|
|
|
|
Instead of being ignored, attributes are now parsed and
included in Span inlines.
The output will be a bit different from stock textile:
e.g. for `*(foo)hi*`, we'll get `<em><span class="foo">hi</span></em>`
instead of `<em class="foo">hi</em>`. But at least the data is
not lost.
|
|
Closes #1115.
|
|
|
|
|
|
Org-reader: support inline images, clean-up code, fix bugs
|
|
|
|
Org-mode and Pandoc use different language identifiers, marking source
code as being written in a certain programming language. This adds more
translations from identifiers as used in Org to identifiers used in
Pandoc.
The full list of identifiers used in Org and Pandoc is available through
http://orgmode.org/manual/Languages.html and `pandoc -v`, respectively.
|
|
Text such as /*this*/ was not correctly parsed as a strong, emphasised
word. This was due to the end-of-word recognition being to strict as it
did not accept markup chars as part of a word. The fix involves an
additional parser state field, listing the markup chars which might be
parsed as part of a word.
|
|
The default pandoc ParserState is replaced with `OrgParserState`. This
is done to simplify the introduction of new state fields required for
efficient Org parsing.
|
|
|
|
We now emit the title (if present) as a separate paragraph
with boldface text.
Closes #1215.
|
|
|
|
|
|
|
|
reader.
Closes #1214
|
|
version which is aware of the more recent meta representation.
|
|
The bug: If a level 2 list was followed by a level 1 list, the first
item of the level 1 list would be lost.
Closes #1213.
|
|
|
|
element and updated files accordingly
|
|
|
|
The reader did not correctly parse inline markup. The behavoir is now as follows.
(a) The markup must start at the start of a line, be inside previous
inline markup or be preceeded by whitespace.
(b) The markup can not span across paragraphs (delimited by \n\n)
(c) The markup can not be followed by a alphanumeric character.
(d) Square brackets can be placed around the markup to avoid having
to have white space before it.
In order to make these changes it was either necessary to convert the parser to return a list of inlines or to convert the whole reader to use the builder. The latter approach whilst more work makes a bit more sense as it becomes easy to arbitarily append and prepend elements without changing the type.
Tests are accordingly updated in a later commit to reflect the different normalisation behavoir specified by the builder monoid.
|
|
We now look for a \caption inside the environment; if one is
found, it is attached to the graphic or tabular found there.
Closes #1204.
|
|
This reverts commit 82ddec698e782fef83dcd1b1fba79cd3b698c717.
|
|
Plan is to use this instead of ParserState in LP.
|
|
Removed updateHeaderMap, setHeaderMap, getHeaderMap,
updateIdentifierList, setIdentifierList, getIdentifierList.
|
|
Previously these were typeclasses of monads. They've been changed
to be typeclasses of states. This ismplifies the instance definitions
and provides more flexibility.
This is an API change! However, it should be backwards compatible
unless you're defining instances of HasReaderOptions, HasHeaderMap,
or HasIdentifierList. The old getOption function should work as
before (albeit with a more general type).
The function askReaderOption has been removed.
extractReaderOptions has been added.
getOption has been given a default definition.
In HasHeaderMap, extractHeaderMap and updateHeaderMap have been added.
Default definitions have been given for getHeaderMap, putHeaderMap,
and modifyHeaderMap.
In HasIdentifierList, extractIdentifierList and updateIdentifierList
have been added. Default definitions have been given for
getIdentifierList, putIdentifierList, and modifyIdentifierList.
The ultimate goal here is to allow different parsers to use their
own, tailored parser states (instead of ParserState) while still
using shared functions.
|
|
Positioning options no longer rendered verbatim.
Partially addresses #1204.
|
|
MediaWiki reader: Accept image links in more languages
|
|
Closes #1203.
|
|
The basic structure of org-mode documents is recognized; however,
org-mode features like todo markers, tags etc. are not supported yet.
|
|
Formerly a closing div tag would be missed if it came right
after other block-level tags.
|