Commit graph

868 commits

Author SHA1 Message Date
John MacFarlane
f232034ab0 Textile reader: Implemented comment blocks. 2012-10-05 10:23:15 -07:00
John MacFarlane
3a3fe2df6c RST reader: Removed 'plain' in blocks, since 'para' includes it. 2012-09-30 22:08:05 -07:00
John MacFarlane
e8260c27e1 RST reader: Consolidate super/subscript, math into interpretedRole. 2012-09-30 20:28:50 -07:00
John MacFarlane
9366d8681d RST reader: Renamed 'image' to 'subst', since it now handles more. 2012-09-30 20:18:14 -07:00
John MacFarlane
9294fc399c Ignore unknown interpreted roles.
The contents are treated as rst, not literal, which will sometimes
be wrong.
2012-09-30 14:59:26 -07:00
John MacFarlane
27bd6fb977 RST reader: Removed requirement that directives begin at left margin.
This was (correctly) not in earlier releases; docutils doesn't
make the requirement.
2012-09-30 14:58:26 -07:00
John MacFarlane
d9f628fd18 RST reader: Require whitespace after field list field names. 2012-09-30 14:57:55 -07:00
John MacFarlane
b07ea7a02d RST reader: Consolidated rawBlock into directive. 2012-09-30 09:59:22 -07:00
John MacFarlane
e5740a138e RST reader: Handle replace:: and unicode:: substitutions. 2012-09-30 09:53:50 -07:00
John MacFarlane
d360172693 RST reader: Make directive labels case-insensitive. 2012-09-29 21:42:55 -07:00
John MacFarlane
779e02126d RST reader: Folded figureBlock into directive. 2012-09-29 18:12:46 -07:00
John MacFarlane
d3b52e42eb RST reader: Made comments a separate parser. 2012-09-29 19:35:49 -04:00
John MacFarlane
1948c55914 RST reader: Folded image block handling into directive. 2012-09-29 19:22:38 -04:00
John MacFarlane
720a7ba0fc RST reader: Folded code block parsers into directive. 2012-09-29 17:37:38 -04:00
John MacFarlane
93600ec9b8 RST reader: Folded default-role parser into directive. 2012-09-29 17:25:14 -04:00
John MacFarlane
93e92a4716 Renamed removedLeadingTrailingSpace to trim.
Also removeLeadingSpace to triml,
removeTrailingSpace to trimr.
2012-09-29 17:09:34 -04:00
John MacFarlane
487d01118f RST reader: Consolidated math block parsers into directive. 2012-09-29 16:59:41 -04:00
John MacFarlane
3a589b7bca RST reader: Refactored directive parser.
We now also hander container, compound, epigraph, rubric,
highligts, pull-quote.
2012-09-29 16:22:13 -04:00
John MacFarlane
b75a5b631b Markdown reader: Worked around some sepBy's. 2012-09-29 11:57:32 -04:00
John MacFarlane
ae68836352 Textile reader: Avoid parsing dashes as strikeout.
Previously the input

    text--
    text--
    text--
    text--

would be parsed with strikeouts rather than dashes. This fixes
the problem by requiring that a strikeout delimiting - not be
followed by a -.

Closes .
2012-09-28 23:37:41 -04:00
John MacFarlane
632fd49d07 Textile reader: Fixed bug affected words ending in hyphen.
Note:  sepBy1 doesn't work quite as I expected.  It gives odd
results if sep succeeds but not p.
2012-09-28 23:29:54 -04:00
John MacFarlane
d6ddc2ff61 Textile: Improvements to surround and symbol. 2012-09-28 23:01:41 -04:00
John MacFarlane
2fbdf9e002 RST reader: Support ".. code::". 2012-09-28 22:20:31 -04:00
John MacFarlane
58909aaf21 RST reader: Combine para/plain. 2012-09-28 22:14:03 -04:00
John MacFarlane
4be137509e RST reader: Made para parser slightly more efficient. 2012-09-28 00:59:05 -04:00
John MacFarlane
ab17faf497 RST reader: Use Text.Pandoc.Builder.
This will give us more flexibility in the future.
It also gives built-in normalization.  Performance slightly
better.
2012-09-27 17:52:48 -07:00
John MacFarlane
5c06322ab2 Shared: Export compactify', formerly in Markdown reader. 2012-09-27 17:52:38 -07:00
John MacFarlane
35662e14a9 Removed nullBlock.
Don't use nullBlock in Textile reader.  Better to know about parsing
problems than to skip stuff when we get stuck.
2012-09-27 16:06:29 -07:00
John MacFarlane
731415a4e5 RST reader: Support :target: on image substitutions. 2012-09-27 15:40:09 -07:00
John MacFarlane
1be27ffb3a Added stateSubstitutions to ParserState, use for RST substitutions. 2012-09-27 15:20:29 -07:00
John MacFarlane
606b5e8ed4 Removed Ext_monospace_autolinks. 2012-09-27 15:01:00 -07:00
John MacFarlane
bae39e77a8 Added Ext_autolink_urls. 2012-09-27 13:43:48 -07:00
John MacFarlane
15a8192b84 Renamed Ext_autolink_code_spans to Ext_monospace_autolinks. 2012-09-27 13:33:14 -07:00
John MacFarlane
f76478bcb9 RST reader: Support :target: on .. image:: blocks.
Still not supported on substitution definitions.
2012-09-26 22:22:14 -07:00
John MacFarlane
22bd34fa33 Markdown reader: Fixed link parser to avoid exponential slowdowns.
Previously the parser would hang on input like this:

    [[[[[[[[[[[[[[[[[[hi

We fixed this by making the link parser parser characters
between balanced brackets (skipping brackets in inline code spans),
then parsing the result as an inline list.

One change is that

    [hi *there]* bud](/url)

is now no longer parsed as a link.  But in this respect pandoc behaved
differently from most other implementations anyway, so that seems okay.
All current tests pass.  Added test for this case.

Closes .
2012-09-22 14:05:09 -07:00
John MacFarlane
1038606036 LaTeX reader: Added a 'try' in rawLaTeXBlock.
This allows the markdown reader to treat '\begin' (not followed
by an argument) as a raw string rather than erroring out when
it doesn't find a '{'.

Closes .
2012-09-22 13:00:59 -07:00
John MacFarlane
ecc206f7c3 RST reader: Small tweaks to raw field lists.
* Don't allow line breaks in field names.
* Strip off initial newline from 'raw' when field body
  begins on next line.
2012-09-16 10:29:35 -07:00
John MacFarlane
9f89269941 Merge pull request from dlax/rst-fieldlists
improvements to rst reader for field lists
2012-09-16 10:19:42 -07:00
John MacFarlane
fc31bf27f5 MediaWiki reader: Allow table in table cell. 2012-09-15 21:06:55 -07:00
John MacFarlane
3e8630c88e MediaWiki reader: Added smart doublequotes with -S option.
Also disallow ' in the "trail" of an internal link; allowing
it causes bugs with `'''[[Link]]'''`.
2012-09-15 16:56:01 -04:00
John MacFarlane
0cd2289eea MediaWiki parser: Improved endline to stop bad breaks. 2012-09-15 16:40:35 -04:00
John MacFarlane
bc29f44d59 MediaWiki reader: Allow def list item with just a term. 2012-09-15 16:25:51 -04:00
John MacFarlane
c9faa2740b MediaWiki reader: Properly handle templates in list items. 2012-09-15 16:17:52 -04:00
John MacFarlane
887fc14f3d HTML reader: Modified htmlTag for fewer false positives.
A tag must start with `<` followed by `!`,`?`, `/`, or a letter.

This makes it more useful in the wikimedia and markdown parsers.
2012-09-15 15:46:16 -04:00
John MacFarlane
c5de3c411f MediaWiki reader: Handle ref tags as footnotes. 2012-09-15 15:33:48 -04:00
John MacFarlane
293452f970 MediaWiki reader: Better parsing of templates. 2012-09-15 15:22:18 -04:00
John MacFarlane
387308dc47 MediaWiki reader: Treat "references" tag as block. 2012-09-15 15:05:50 -04:00
John MacFarlane
0a2fb202fb MediaWiki reader: Interpret width attribute on table columns. 2012-09-15 15:04:11 -04:00
John MacFarlane
26fb63e294 MediaWiki reader: Got alignments working.
They only work on headers, because pandoc forces same
alignment for all cells in a column.
2012-09-15 14:20:50 -04:00
John MacFarlane
eca9eeab6b MediaWiki reader: Misc fixes, put category links at end. 2012-09-15 13:50:02 -04:00