Commit Graph
3114 Commits
Author SHA1 Message Date
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
John MacFarlane adaae082fc Fixed problem with inline code in ConTeXt writer.
Previously `}` would be rendered '\type{}}'.
Now we check the string for '}' and '{'. If it contains neither,
use \type{}; otherwise use \mono{} with an escaped version of the
string.

Note:  There are some issues using the \type!str! form, including
differences btw mkii and mkiv. For now this is a conservative fix.
Perhaps in the future we can use \type!str!.  See the discussion on
pandoc-discuss s.v. "Bug in context writer".
2011-01-19 11:53:00 -08:00
John MacFarlane 9a739e30bf Fixed problem with strikout in LaTeX headers with hyperref.
Added a command to the latex template to disable \sout inside
pdf strings.  Thanks to Joost Kremers for the fix.
2011-01-19 11:43:30 -08:00
John MacFarlane 933cdaf4c8 Show Haskell-readable version of input string in test failure. 2011-01-19 09:44:53 -08:00
John MacFarlane 831889bebc Unit tests: On failure, print the input string. 2011-01-19 09:38:14 -08:00
John MacFarlane 608d5bc753 Added normalize in latex reader tests. 2011-01-18 23:37:54 -08:00
John MacFarlane 0502c0fd28 Revamped tests with new =: and =?> operators + builder.
Left in a couple failing tests for demonstration purposes.
2011-01-18 23:34:34 -08:00
John MacFarlane 0cfafdec64 Replaced --no-citeproc with --natbib in tests. 2011-01-16 11:19:52 -08:00
John MacFarlane 8f7c119c0f Removed '--no-citeproc' as alias for '--natbib'.
This was confusing, I think, as no-citeproc could be either
natbib or biblatex.
2011-01-16 11:08:56 -08:00
John MacFarlane 281b36470f Minor code formatting. 2011-01-16 11:08:20 -08:00
John MacFarlane 25da1680c3 Documented --chapters in README. 2011-01-16 09:34:47 -08:00
John MacFarlane b6d1f4bc9e Moved --chapters to before --number-sections in option list. 2011-01-16 09:34:26 -08:00
John MacFarlane 491eb00e40 Setup.hs: Only make pandoc.1 if README modified, be more verbose. 2011-01-16 09:27:54 -08:00
John MacFarlane ab20da4be5 Support --chapters for ConTeXt output as well. 2011-01-16 09:08:19 -08:00
John MacFarlane ece098b9e0 Use <chapter> for top docbook header if template has <book>.
Resolves Issue #265.
2011-01-16 08:59:53 -08:00
John MacFarlane 9721b87c26 Added --chapters option affecting docbook and latex.
* Added writerChapters to WriterOptions.
* Added --chapters command-line option.
* --chapters causes top-level headers to be "chapter" instead of
  "section" in LaTeX and DocBook.
* Resolves Issue #225.
2011-01-16 08:58:29 -08:00
John MacFarlane 53eb2c4828 HTML writer: Add ids to <section> tags. 2011-01-15 22:35:25 -08:00
John MacFarlane 19234efc95 Added upper bounds to all cabal dependencies. 2011-01-15 11:51:39 -08:00
John MacFarlane a0e19ba8aa Merge branch 'tests' 2011-01-15 09:25:01 -08:00
John MacFarlane 8ad6e013fc Added new tests to pandoc.cabal.
Otherwise cabal sdist won't include them.
2011-01-15 08:23:03 -08:00
John MacFarlane 18231a8232 Fixed lhs tests for new position of <title> after <meta>s. 2011-01-15 08:22:41 -08:00
John MacFarlane 4d0951d895 Require Cabal version >= 1.6. 2011-01-14 22:47:52 -08:00
John MacFarlane a1aa53a47d Updated changelog. 2011-01-14 22:38:46 -08:00
John MacFarlane fd79417825 Fixed the parser for rst+lhs - set stateLiterateHaskell. 2011-01-14 22:38:02 -08:00
John MacFarlane 458aec2395 Removed relann1.7 for now - duplicates changelog. 2011-01-14 20:53:22 -08:00
John MacFarlane a5cbcdfe3a HTML reader: parse simple tables.
Resolves Issue #106.  Thanks to Rodja Trappe for the idea
and some sample code.
2011-01-14 20:48:10 -08:00
John MacFarlane c31d3cc306 HTML reader: parse location tags in pSatisfy.
This avoids the need for manual parsing all over the place.
2011-01-14 20:47:32 -08:00
John MacFarlane 9305114b9f LaTeX writer: Escape strings in \href{..}.
Previously strings weren't escaped, so %5D would be interpreted
as a LaTeX comment!
2011-01-14 18:59:50 -08:00
John MacFarlane 5131589be0 Simplified Text.Pandoc.CharacterReferences by using TagSoup entity lookup 2011-01-14 18:28:54 -08:00
John MacFarlane dc93073804 Minor code cleanup. 2011-01-14 18:09:16 -08:00
John MacFarlane 0222f367b1 Keep Tests.Arbitrary but remove quickcheck tests for now.
Remove Tests.Shared.
Remove dependency on QuickCheck.
2011-01-14 18:01:57 -08:00