Commit graph

3 commits

Author SHA1 Message Date
John MacFarlane
007eb96e06 Markdown reader: Make one-column pipe tables work.
Closes #1218.
2014-05-01 09:23:21 -07:00
John MacFarlane
fadc7b0d87 Major rewrite of markdown reader.
* Use Builder's Inlines/Blocks instead of lists.

* Return values in the reader monad, which are then
  run (at the end of parsing) against the final
  parser state.  This allows links, notes, and
  example numbers to be resolved without a second
  parser pass.

* An effect of using Builder is that everything is
  normalized automatically.

* New exports from Text.Pandoc.Parsing:
  widthsFromIndices, NoteTable', KeyTable', Key', toKey',
  withQuoteContext, singleQuoteStart, singleQuoteEnd, doubleQuoteStart,
  doubleQuoteEnd, ellipses, apostrophe, dash

* Updated opendocument tests.

* Don't derive Show for ParserState.

* Benchmarks:  markdown reader takes 82% of the time it took before.
  Markdown writer takes 92% of the time (here the speedup is probably
  due to the fact that everything is normalized by default).
2012-08-01 21:45:40 -07:00
John MacFarlane
d2cc56a46a Revised code for pipe tables.
* All tables now require at least one body row.
* Renamed from 'extra' to 'pipe' tables.
* Moved functions from Parsing to Readers.Markdown.
* Cleaned up code; revised to parse in one pass rather than
  parsing a raw string, splitting it, and parsing the components.
* Allow pipe tables without pipes on the ends (as PHP Markdown Extra
  does).
2012-07-22 22:09:15 -07:00
Renamed from tests/extra-tables.native (Browse further)