Age | Commit message (Collapse) | Author | Files | Lines |
|
This commit moves some code which was only used for the Markdown Reader
into a generic form which can be used for any Reader. Otherwise, it
takes naming and interface cues from the preexisting Markdown code.
|
|
move `addWarning` to Parsing.hs, so it can be used by Markdown & RST readers.
|
|
Fix 'Ext_lists_without_preceding_blankline' bug.
|
|
Formerly `pandoc -f markdown-fancy_lists+startnum` did not work
properly.
|
|
|
|
* Fixes #1636.
* Adds a test.
|
|
Previously text that ended a div would be parsed as Plain
unless there was a blank line before the closing div tag.
Test case:
<div class="first">
This is a paragraph.
This is another paragraph.
</div>
Closes #1591.
|
|
This was previously failing to be recognized as a link:
[Test](http://en.wikipedia.org/wiki/Ward's_method)
Closes #1534.
|
|
Indented code at the beginning of a list item must be indented eight
spaces from the margin (or from the edge of the container), or four
spaces past the list marker, whichever is farther.
Some examples in `tests/markdown-reader-more.txt`.
|
|
This allows users to turn off the default pandoc behavior of
parsing contents of div and span tags in markdown and HTML
as native pandoc Div blocks and Span inlines.
Setting of default epub extensions has been moved from the EPUB
reader to Text.Pandoc.
|
|
It now works as in PHP markdown extra. Setting `markdown="1"` on
an outer tag affects all contained tags until it is reversed with
`markdown="0"`. Closes #1378.
Added `stateMarkdownAttribute` to `ParserState`.
|
|
Test case:
<aside markdown="1">
*hi*
</aside>
Previously gave:
<article markdown="1">
<p><em>hi</em> </article></p>
|
|
* This change brings pandoc's definition list syntax into alignment
with that used in PHP markdown extra and multimarkdown (with the
exception that pandoc is more flexible about the definition markers,
allowing tildes as well as colons).
* Lazily wrapped definitions are now allowed; blank space is required
between list items; and the space before definition is used to
determine whether it is a paragraph or a "plain" element.
* For backwards compatibility, a new extension,
`compact_definition_lists`, has been added that restores the behavior
of pandoc 1.12.x, allowing tight definition lists with no blank space
between items, and disallowing lazy wrapping.
|
|
Thanks @dubiousjim. Close #1431.
|
|
This properly handles tags that should be self-closing.
Previously `<hr/>` would appear in EPUB output as `<hr></hr>`.
Closes #1420.
|
|
This function is equivalent to the more general (<*) which is defined in
Control.Applicative. This change makes pandoc code easier to understand for
those not familar with the codebase.
|
|
This sets `stateInHtmlBlock` to `Just "div"` when we're parsing
an HTML div.
Without this fix, a closing `</div>` tag could be parsed as part
of a list item rather than after the list.
|
|
Closes #1121.
|
|
Semantics should be the same.
|
|
- We no longer include trailing spaces and newlines in the
raw blocks.
- We look for closing tags for elements (but without backtracking).
- Each block-level tag is its own RawBlock; we no longer try to
consolidate them (though `--normalize` will do so).
Closes #1330.
|
|
This helps when you have two minipages which can't have
blank lines between them.
See #690, #1196.
|
|
`<span style="font-variant:small-caps;">foo</span>` will be
parsed as a `SmallCaps` inline, and will work in all output
formats that support small caps.
Closes #1360.
|
|
When the `hard_line_breaks` option was specified, pandoc would
produce a spurious line break after a tight list item. This
patch solves the problem. Closes #1137.
|
|
This allows blank lines at end of multiline headers.
|
|
|
|
in github-style fenced blocks. Closes #1318.
Note: This is special-case handling of these two cases.
It would be good to do something more systematic.
|
|
The function can be used by other readers, so it is made accessible for
all parsers.
|
|
Both `ParserState` and `OrgParserState` keep track of the parser position at
which the last string ended. This patch introduces a new class
`HasLastStrPosition` and makes the above types instances of that class. This
enables the generalization of functions updating the state or checking if one
is right after a string.
|
|
|
|
We need to strip off up to 4 spaces, not up to 3.
|
|
Closes #1154.
When reading a raw list item, we now strip off nonindent
spaces.
|
|
Includes test.
|
|
Closes #1218.
|
|
The change to aeson > 0.7 caused numbers to be rendered with
decimals. This change causes them to be rendered without decimals
wehn possible.
|
|
The function `compactify'DL`, used to change the final definition item of a
definition list into a `Plain` iff all other items are `Plain`s as well, is
useful in many parsers and hence moved into Text.Pandoc.Shared.
|
|
element and updated files accordingly
|
|
Closes #1203.
|
|
Formerly a closing div tag would be missed if it came right
after other block-level tags.
|
|
|
|
Switched `notFollewdBy' rawHtmlBlocks` ->
`notFollowedBy' (htmlTag isBlockTag)`, which is more
efficient.
|
|
This is to debug backtracking-related parsing bugs.
So far it is only implemented for markdown, but it would
be good to extend it to latex and html readers.
|
|
The bug was triggered by:
Link to [Google][]. Link to [twitter][].
[Google]: http://google.com
[twitter]: http://twitter.com
|
|
|
|
Keys may now start with an underscore as well as a letter.
Underscores do not count as internal punctuation, but are
treated like alphanumerics, so "key:_2008" will work, as
it did not before. (This change was necessary to use keys
generated by zotero.)
Closes #1111, closes #1011.
|
|
The \-newline form must be used; the two-space+newline form
won't work, since in a table cell nearly every line ends with
two spaces.
|
|
Replace uses of `maybe x id` with `fromMaybe x`.
|
|
Remove parens enclosing a single element.
|
|
Replaces long conditional chains with calls to `elem` and `notElem`.
|
|
(That is, markdown-markdown_in_html_blocks.)
Previously a spurious `<p>` tag was being added.
Closes #1093.
|
|
If author field was empty, date was being ignored. Closes #1089.
|