Commit Graph
2144 Commits
Author SHA1 Message Date
John MacFarlane eb26fa6f54 Distinguish latex & context environments; blank line after in writers. 2011-01-26 17:23:56 -08:00
John MacFarlane bd43c0f4c9 Bumped version to 1.8; depend on pandoc-types 1.8.
The old TeX, HtmlInline and RawHtml elements have been removed
and replaced by generic RawInline and RawBlock elements.

All modules updated to use the new raw elements.
2011-01-26 17:22:53 -08:00
John MacFarlane 5bee388914 Updated textile tests. 2011-01-23 10:18:53 -08:00
John MacFarlane 65a015e74b Added needed space after .bc and .bq.
Otherwise these can trap a </dd>, for example.

Better solution to try next: rewrite using Pretty.
2011-01-23 10:08:11 -08:00
John MacFarlane 16d4366431 Textile writer: Don't escape code in bc. block. 2011-01-23 09:44:28 -08:00
John MacFarlane 38013de857 Textile writer: Don't HTML-escape between @'s. 2011-01-23 09:12:50 -08:00
John MacFarlane 628a1ef815 Textile reader: Fixed bug (swallowed p at beginning of paragraph).
The problem was a missing 'try' in the maybeExplicitBlock parser.
Test case, a paragraph beginning with 'p', has been added.
2011-01-23 08:59:35 -08:00
John MacFarlane 7234a79104 Textile writer: Use <pre> instead of bc.. for code with blank lines.
This has fewer interaction effects.
2011-01-23 08:49:55 -08:00
John MacFarlane 1d683be414 Textile reader: Support <tt> for inline code. 2011-01-23 00:25:05 -08:00
John MacFarlane 50d08ec2c3 Textile reader: Added code blocks with bc. 2011-01-23 00:05:35 -08:00
John MacFarlane 9f99c39caf Default to textile writer on .textile extension. 2011-01-23 00:05:10 -08:00
John MacFarlane d562efa39d ConTeXt writer: Ensure cr after \stoptyping. 2011-01-22 23:26:44 -08:00
John MacFarlane ea5cd35004 Text.Pandoc: Added jsonFilter for easy construction of scripts.
Here's an example of its use:

-- removelinks.hs - removes links from document
import Text.Pandoc

main = interact $ jsonFilter $ bottomUp removeLink

removeLink :: Inline -> Inline
removeLink (Link xs _) = Emph xs
removeLink x = x
2011-01-22 17:53:16 -08:00
John MacFarlane a74010a051 Markdown reader: slight speedup by moving whitespace parser. 2011-01-22 16:04:32 -08:00
John MacFarlane a6d7d88b0f RST reader: Big speed improvement (300->260ms).
Moved whitespace parser to top of inline parsers.
2011-01-22 16:01:42 -08:00
John MacFarlane b9356fcc7e Removed deliberate error in LaTeX reader tests. 2011-01-22 16:01:14 -08:00
John MacFarlane 2bea4e3729 Reorganized tests.
The native writer test needs to run before others that depend on it.
2011-01-22 15:54:24 -08:00
John MacFarlane 87aaa7e719 Use ANSI color to point to diffs in test output.
ConTeXt writer bullet list test set to break as an example.
2011-01-22 14:58:32 -08:00
John MacFarlane 9548f06699 Added stripansi.sh, for sending 'cabal test' output to file.
cabal test | ./stripansi.sh > test.log.
2011-01-22 14:36:36 -08:00
John MacFarlane 91cc03b131 Tests.Helpers: Added file quasiquoter.
This allows you to take expected test output from a file.
2011-01-22 13:54:12 -08:00
John MacFarlane 1fd5e3bcff Tests.Arbitrary: Let strings include any character. 2011-01-22 13:40:29 -08:00
John MacFarlane 5a1abbe7ac Fixed -Wall error in imports. 2011-01-22 13:40:18 -08:00
John MacFarlane c801f4f621 Put dashed lines around diff results in Old test. 2011-01-22 13:39:59 -08:00
John MacFarlane 61c0647d49 Depend on latest QuickCheck2. 2011-01-22 13:39:36 -08:00
John MacFarlane 373d05601a Added native writer tests. 2011-01-22 12:37:19 -08:00
John MacFarlane 209b300d6a Added 'property' in Tests.Helpers & some quickcheck tests. 2011-01-22 12:18:59 -08:00
John MacFarlane d86d9260df Tests.Arbitrary: Added instances for Inlines, Blocks. 2011-01-22 12:18:23 -08:00
John MacFarlane 8dcc67a993 ConTeXt writer: Don't add cr at end of inline footnote. 2011-01-22 12:17:39 -08:00
John MacFarlane 15250859c3 Improved test framework.
Now there is a uniform interface for reader and writer tests.
Also added a quasiquoter, for multiline strings.
2011-01-22 10:50:15 -08:00
John MacFarlane b3c1a89cdf Merge branch 'master' of github.com:jgm/pandoc 2011-01-21 19:55:24 -08:00
John MacFarlane 654c39a7d2 latex template: move special treatment of \sout.
It needs to be inside the if(strikeout) condition, after
the ulem package is imported; otherwise we try to renewcommand{\sout} when
\sout isn't yet defined.
2011-01-21 19:24:00 -08:00
John MacFarlane d43dbc83f2 More informative output on writer test failure. 2011-01-21 11:02:59 -08:00
John MacFarlane d0726920db Added Tests.Writers.ConTeXt and helpers for writer tests. 2011-01-21 10:23:41 -08:00
John MacFarlane 5c35be1362 Make sure native output ends in newline with --standalone. 2011-01-21 09:58:23 -08:00
John MacFarlane bfbc289871 Haddock comment improvements. 2011-01-21 09:00:05 -08:00
John MacFarlane 9bb5b54102 Added --normalize option. 2011-01-20 22:48:20 -08:00
John MacFarlane e5e2b0f9ab Fixed the two test cases that were intentionally set to fail. 2011-01-20 22:38:16 -08:00
John MacFarlane 52b6e38425 Updated tests for new native format. 2011-01-20 22:36:40 -08:00
John MacFarlane 8894b1a030 Markdown writer: Avoid printing excess spaces at end if no notes/refs. 2011-01-20 22:36:08 -08:00
John MacFarlane 8011d079c8 Native writer: eliminated empty spaces in brackets. 2011-01-20 20:48:06 -08:00
John MacFarlane 6b50778b2a Export readNative in Text.Pandoc.Shared. 2011-01-20 08:52:59 -08:00
John MacFarlane 810e3336dc Improved native writer using Pretty.
2-3X speed improvement and more consistent layout.
2011-01-20 08:43:13 -08:00
John MacFarlane 978d949526 Made writeNative sensitive to writerStandalone.
The Pandoc (Meta ...) is not written unless standalone is set.
2011-01-19 18:57:25 -08:00
John MacFarlane e1f3c6058e Added Text.Pandoc.Readers.Native (readNative).
readNative can now read full pandoc documents, block lists, blocks,
inline lists, or inlines.  It will interpret

Str "hi"

as if it were

Pandoc (Meta [] [] []) [Plain [Str "hi"]]

This should make testing easier.
2011-01-19 18:36:27 -08:00
John MacFarlane e647f761ed Use spaceChar instead of oneOf " \t" in rst reader. 2011-01-19 15:17:51 -08:00
John MacFarlane 1b8a9711b8 Replaced more noneOf/oneOf parsers. 2011-01-19 15:14:23 -08:00
John MacFarlane a400cfe10f Replaced uses of oneOf with more efficient parsers.
This speeds up the markdown reader.
2011-01-19 15:06:56 -08:00
John MacFarlane c09518eefd More small parser rewrites for small performance gains. 2011-01-19 14:59:59 -08:00
John MacFarlane 61f3db612c Parsing: Rewrote spaceChar for significant speedup in readers. 2011-01-19 14:45:15 -08:00
John MacFarlane 3442df88bd Include man pages in extra-source-files.
The man pages are produced by a post-build hook, using
MakeManPage.hs.  However, there seem to be problems running
this program on some systems; see
https://github.com/jgm/pandoc/issues/#issue/15.

This change means that the generated man pages will be included in
the tarball produced by 'cabal sdist', and hence in releases.
They will still be updated by the build process if the sources
change, but in most builds, the man page won't need to be regenerated.
2011-01-19 12:17:37 -08:00