Commit Graph
578 Commits
Author SHA1 Message Date
John MacFarlane 017095f690 MediaWiki reader: Implemented numbered external links. 2012-09-13 15:24:05 -07:00
John MacFarlane 81bec8558c MediaWiki reader: Support HTML lists. 2012-09-13 14:47:11 -07:00
John MacFarlane 3fe6ea4c41 MediaWiki reader: Handle templates, variables as raw mediawiki.
Also check for column 1 in preformatted text.
2012-09-13 12:03:54 -07:00
John MacFarlane 5104c2190b MediaWiki reader: preformatted blocks and tests. 2012-09-12 22:44:11 -07:00
John MacFarlane b703c76540 MediaWiki reader: Support <math> tag. 2012-09-12 19:57:34 -07:00
John MacFarlane def768cd1f Added tests for mediawiki lists. 2012-09-12 19:48:11 -07:00
John MacFarlane a76c6df826 More mediawiki reader tests. 2012-09-12 19:35:06 -07:00
John MacFarlane b19aee4e1e Added some tests for mediawiki reader. 2012-09-12 19:15:34 -07:00
John MacFarlane 3d361b2101 Added basic mediawiki reader.
Text.Pandoc.Readers.MediaWiki module,
tests/mediawiki-reader.{txt,native}.
2012-09-12 09:05:10 -07:00
John MacFarlane bad3c88cb6 HTML writer: Improve line breaks with <dd> tags.
We now put a newline between `</dd>` and `<dd>` when
there are multiple definitions.
2012-09-12 08:45:03 -07:00
John MacFarlane 3e8e20b4f5 Fixed spacing in context writer test. 2012-09-08 12:13:36 -07:00
John MacFarlane 7d0438897b LaTeX reader: Support obeylines environment.
Closes #604.
2012-09-06 16:27:01 -07:00
John MacFarlane e2cc9e7ca1 LaTeX reader: Use curly quotes for bare straight quotes. 2012-09-06 16:02:56 -07:00
John MacFarlane c9d1d97a28 Fixed footnotes bug in textile.
This affected notes occuring before punctuation, e.g.
`foo[1].`.

Closes #518.
2012-09-06 10:38:56 -07:00
John MacFarlane b21363f1d5 Added (failing) test case for #518. 2012-08-25 22:11:31 -07:00
John MacFarlane 5d3b295568 Man writer: Escape - as \-.
Unescaped -'s become hyphens, while \-'s are left as ascii
minus signs.  That is preferable for use with command-line
options.

See  http://lintian.debian.org/tags/hyphen-used-as-minus-sign.html.
Thanks to Andrea Bolognani for bringing the issue to our
attention.
2012-08-18 10:29:15 -07:00
John MacFarlane dfa4b76630 Changes to literate haskell options.
- Removed writerLiterateHaskell from WriterOptions.
- Removed readerLiterateHaskell from ReaderOptions.
- Added Ext_literate_haskell to Extensions.  Test for this
  instead of the above.
- Removed failUnlessLHS from Shared.

Note:  At this point, +lhs and .lhs extension no longer has any effect.
Need to fix.
2012-08-08 23:18:19 -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 00dc1e715e Moved WriterOptions and associated types Shared -> Options. 2012-07-26 22:59:56 -07:00
John MacFarlane acbb4a5e46 Integrated test suite with cabal.
To run tests, configure with --enable-tests, then 'cabal test'.
You can specify particular tests using --test-options='-t markdown'.

No output is shown unless tests fail.  In the future, we can move
to the detailed-1.0 interface.
2012-07-26 09:43:27 -07:00
John MacFarlane 45e4c123a4 Moved tests to tests/, modified cabal file so lib isn't recompiled. 2012-07-26 08:37:36 -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
John MacFarlane 5a704ecc6e Renamed tests/markdown-tables -> tests/extra-tables.
Added to cabal file.
2012-07-22 19:28:56 -07:00
John MacFarlane 511f5e891d Merge pull request #510 from mytskine/markdown-extra
Markdown extra tables [part of the multi-markdown syntax for tables]
2012-07-22 18:40:18 -07:00
John MacFarlane 1d19400572 Removed fb2.math-webtex.fb2 tests.
Test suite should not require net access to run.
2012-07-22 11:15:59 -07:00
Sergey Astanin 436a585c3b FB2: support images embedded as data URIs + tests. 2012-07-22 11:13:14 -07:00
Sergey Astanin a9429e951c Test suite for FB2 writer. 2012-07-22 11:13:14 -07:00
John MacFarlane 26748da6d4 Don't recognize inline-markup starts inside words.
For example, "2*2 = 4*1" should not contain an emphasized
section.  Added test case for "Literal symbols".  Closes #569.
2012-07-16 10:58:44 -07:00
John MacFarlane f68b05e74b Textile reader: properly handle links with surrounding brackets.
Square brackets need to be used when the link isn't surrounded by
spaces or punctuation, or when the URL ending may be ambiguous.

Closes #564.
2012-07-13 14:01:56 -07:00
John MacFarlane 7da913dbd7 ConTeXt writer: don't escape &,^,<,>.
Simplified escapes for `}` and `{` to `\{` and `\}`.

Thanks to Aditya Mahajan.
2012-06-27 15:05:13 -07:00
John MacFarlane d320c2eac5 MediaWiki writer: Avoid extra blank lines after sublists.
Thanks to Gavin Beatty.
2012-06-27 14:46:46 -07:00
John MacFarlane e9f6366af7 Don't escape _ as \letterunderscore{} in ConTeXt. 2012-06-26 19:50:52 -07:00
John MacFarlane a08650a603 Updated tests for changes in LaTeX template. 2012-06-08 11:00:27 -07:00
John MacFarlane 3982aaaed6 Updated tests for changes in LaTeX changes. 2012-06-05 22:25:54 -07:00
John MacFarlane 337735ae32 Updated tests for changes in latex template. 2012-06-05 11:52:57 -07:00
John MacFarlane 927b5997d8 Added failing tests for note beginning with a citation.
See issue #531.
2012-06-03 19:26:36 -07:00
John MacFarlane 9ab5b00221 Updated test suite. 2012-06-03 11:08:57 -07:00
paul.rivier 75cba828b5 Textile reader: fix for <notextile> and ==.
Closes #517.
2012-05-29 17:40:55 -07:00
John MacFarlane 87f6256e4a Added (failing) tests for textual citations in footnotes. 2012-05-23 13:36:36 -07:00
John MacFarlane 4991852edb Markdown writer: Improved definition lists.
* Use `:` form instead of `~`, for better compatibility with other
  markdown implementations.

* Don't wrap the term, because it breaks definition lists.
2012-05-16 13:07:58 -07:00
John MacFarlane 4e35c67c23 LaTeX writer: More consistent interblock spacing. 2012-05-14 07:04:47 -07:00
John MacFarlane 87de361cdc DocBook reader: More improvements, passes tests. 2012-05-09 10:34:37 -07:00
John MacFarlane fb62e0937c DocBook reader: More test improvements. 2012-05-08 23:53:55 -07:00
John MacFarlane 2e07fb623d DocBook reader tests - further refinements. 2012-05-08 23:39:01 -07:00
John MacFarlane 4f8c536de0 DocBook reader: More improvements, more tests pass. 2012-05-08 23:25:34 -07:00
John MacFarlane 8ba8a720ed DocBook reader: Improved def lists with multiple defs. 2012-05-08 22:18:24 -07:00
John MacFarlane f1869a05fd Improved docbook reader tests. 2012-05-08 21:44:33 -07:00
John MacFarlane c20c139255 Added docbook reader tests (still failing). 2012-05-08 20:26:39 -07:00
John MacFarlane 9961dc274a Improved spacing around LaTeX block environments.
verbatim, itemize, description, enumerate.
2012-04-30 09:26:15 -07:00
John MacFarlane 8201257b5c LaTeX writer: Fixed spacing in quote environments.
Closes #502.  Previously you'd get:

~~~
hi

\begin{quote}
hi

\end{quote}
hi
~~~

Now we get:

~~~
hi

\begin{quote}
hi
\end{quote}

hi
~~~
2012-04-30 07:46:38 -07:00