Commit Graph
49 Commits
Author SHA1 Message Date
John MacFarlane 93e92a4716 Renamed removedLeadingTrailingSpace to trim.
Also removeLeadingSpace to triml,
removeTrailingSpace to trimr.
2012-09-29 17:09:34 -04:00
John MacFarlane 6ad7ac1239 Removed need for utf8-string package.
* Depend on text.
* Expose Text.Pandoc.UTF8.
* Text.Pandoc.UTF8 now exports toString, fromString,
  toStringLazy, fromStringLazy.
* These are used instead of the old utf8-string functions.
2012-09-25 19:54:21 -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 #620.
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 #622.
2012-09-22 13:00:59 -07:00
John MacFarlane 93c35cbf14 Tests.Old: Set TMP to ".".
Otherwise TMP is unset and, on Windows, C:\Windows is used by default,
leading to permission violations.
2012-09-21 20:34:27 -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 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 00dc1e715e Moved WriterOptions and associated types Shared -> Options. 2012-07-26 22:59:56 -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 570d8ff08c Moved tests to src. 2011-01-29 11:24:16 -08:00
John MacFarlane 0833daff4a Added Tests.Shared with normalize round-trip tests. 2011-01-29 10:03:24 -08:00
John MacFarlane 18089a44f5 Tests.Arbitrary: don't allow empty list items. 2011-01-29 10:02:12 -08:00
John MacFarlane e9899b9ab8 Removed intentionally failing test in ConTeXt writer tests. 2011-01-29 09:04:05 -08:00
John MacFarlane d8c9b0c6f7 Added biblatex citation tests to Tests.Readers.LaTeX.
Removed old biblatex-citations.latex.
2011-01-29 09:01:30 -08:00
John MacFarlane 7961208aaf Added natbib citation tests to Tests.Readers.LaTeX.
Removed old tests/natbib-citations.latex.
2011-01-29 08:47:00 -08:00
John MacFarlane 0acf774011 Added Tests.Readers.Markdown. 2011-01-26 22:09:09 -08:00
John MacFarlane f8dca6ccbc Add support for attributes in inline Code.
Additional related changes:

* URLs in Code in autolinks now use class "url".
* Require highlighting-kate 0.2.8.2, which omits the final <br/> tag,
  essential for inline code.
2011-01-26 20:44:25 -08:00
John MacFarlane 703c421c9e RST reader: Improved field lists.
Field lists now work properly with block content.
(Thanks to Lachlan Musicman for pointing out the bug.)

In addition, definition list items are now always Para instead
of Plain -- which matches behavior of rst2xml.py.

Finally, in image blocks, the alt attribute is parsed properly
and used for the alt, not also the title.
2011-01-26 17:23:57 -08:00
John MacFarlane 066cbbad76 Added RST reader tests. 2011-01-26 17:23:56 -08:00
John MacFarlane c5384a33c0 Updates for compiling with ghc 7.
We now use a CPP trick to have compatible quasiquotes that
work in both GHC 6.12 and 7.
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 b9356fcc7e Removed deliberate error in LaTeX reader tests. 2011-01-22 16:01:14 -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 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 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 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 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 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 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 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
John MacFarlane d41c17a2d5 Added quickcheck tests for normalize in Shared. 2011-01-14 00:30:36 -08:00
John MacFarlane b3fb541d01 Added Tests/Arbitrary.hs, with Arbitrary instances. 2011-01-13 22:31:04 -08:00
John MacFarlane 75e8ab25ef Adjusted source to 80-column limit. 2011-01-13 11:11:55 -08:00
John MacFarlane 4ccd30fe3e Moved Tests.Shared -> Tests.Helpers.
Tests.Shared would be the natural place to put tests for functions
in Text.Pandoc.Shared.
2011-01-13 10:59:44 -08:00
Nathan Gass 2dadb67b25 Generalized latexTestWithState to readerTestWithState. 2011-01-12 19:32:26 +01:00
Nathan Gass daf5444e24 Merge branch 'tests' of github.com:xabbu42/pandoc into tests 2011-01-12 19:13:15 +01:00
Nathan Gass e61348dc11 Reordered test files. 2011-01-12 19:12:54 +01:00