aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2007-07-08Added version of test suite for man page.fiddlosopher1-0/+749
git-svn-id: https://pandoc.googlecode.com/svn/trunk@645 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08Added test suites for RST, markdown, and man tables.fiddlosopher3-0/+336
git-svn-id: https://pandoc.googlecode.com/svn/trunk@642 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08Updated tests to account for changes in HTML writer (identifiers).fiddlosopher5-48/+48
git-svn-id: https://pandoc.googlecode.com/svn/trunk@641 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07Added table tests for all writers.fiddlosopher1-0/+12
git-svn-id: https://pandoc.googlecode.com/svn/trunk@639 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-11Added RTF table writer tests.fiddlosopher2-0/+284
git-svn-id: https://pandoc.googlecode.com/svn/trunk@600 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-10Updated test suite with new tests for definition lists.fiddlosopher9-0/+538
git-svn-id: https://pandoc.googlecode.com/svn/trunk@597 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-09+ Use new alignment parameter in title/author/date,fiddlosopher1-270/+270
instead of hardcoded \qc. + Adjusted test suite to account for changes in RTF writer. git-svn-id: https://pandoc.googlecode.com/svn/trunk@594 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-04-13Updated test suite to reflect new prettyprinted nativefiddlosopher1-5/+77
Table format. git-svn-id: https://pandoc.googlecode.com/svn/trunk@583 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-04-10Extensive changes stemming from a rethinking of the Pandoc datafiddlosopher6-315/+200
structure. Key and Note blocks have been removed. Link and image URLs are now stored directly in Link and Image inlines, and note blocks are stored in Note inlines. This requires changes in both parsers and writers. Markdown and RST parsers need to extract data from key and note blocks and insert them into the relevant inline elements. Other parsers can be simplified, since there is no longer any need to construct separate key and note blocks. Markdown, RST, and HTML writers need to construct lists of notes; Markdown and RST writers need to construct lists of link references (when the --reference-links option is specified); and the RST writer needs to construct a list of image substitution references. All writers have been rewritten to use the State monad when state is required. This rewrite yields a small speed boost and considerably cleaner code. * Text/Pandoc/Definition.hs: + blocks: removed Key and Note + inlines: removed NoteRef, added Note + modified Target: there is no longer a 'Ref' target; all targets are explicit URL, title pairs * Text/Pandoc/Shared.hs: + Added 'Reference', 'isNoteBlock', 'isKeyBlock', 'isLineClump', used in some of the readers. + Removed 'generateReference', 'keyTable', 'replaceReferenceLinks', 'replaceRefLinksBlockList', along with some auxiliary functions used only by them. These are no longer needed, since reference links are resolved in the Markdown and RST readers. + Moved 'inTags', 'selfClosingTag', 'inTagsSimple', and 'inTagsIndented' to the Docbook writer, since that is now the only module that uses them. + Changed name of 'escapeSGMLString' to 'escapeStringForXML' + Added KeyTable and NoteTable types + Removed fields from ParserState; 'stateKeyBlocks', 'stateKeysUsed', 'stateNoteBlocks', 'stateNoteIdentifiers', 'stateInlineLinks'. Added 'stateKeys' and 'stateNotes'. + Added clause for Note to 'prettyBlock'. + Added 'writerNotes', 'writerReferenceLinks' fields to WriterOptions. * Text/Pandoc/Entities.hs: Renamed 'escapeSGMLChar' and 'escapeSGMLString' to 'escapeCharForXML' and 'escapeStringForXML' * Text/ParserCombinators/Pandoc.hs: Added lineClump parser: parses a raw line block up to and including following blank lines. * Main.hs: Replaced --inline-links with --reference-links. * README: + Documented --reference-links and removed description of --inline-links. + Added note that footnotes may occur anywhere in the document, but must be at the outer level, not embedded in block elements. * man/man1/pandoc.1, man/man1/html2markdown.1: Removed --inline-links option, added --reference-links option * Markdown and RST readers: + Rewrote to fit new Pandoc definition. Since there are no longer Note or Key blocks, all note and key blocks are parsed on a first pass through the document. Once tables of notes and keys have been constructed, the remaining parts of the document are reassembled and parsed. + Refactored link parsers. * LaTeX and HTML readers: Rewrote to fit new Pandoc definition. Since there are no longer Note or Key blocks, notes and references can be parsed in a single pass through the document. * RST, Markdown, and HTML writers: Rewrote using state monad new Pandoc and definition. State is used to hold lists of references footnotes to and be printed at the end of the document. * RTF and LaTeX writers: Rewrote using new Pandoc definition. (Because of the different treatment of footnotes, the "notes" parameter is no longer needed in the block and inline conversion functions.) * Docbook writer: + Moved the functions 'attributeList', 'inTags', 'selfClosingTag', 'inTagsSimple', 'inTagsIndented' from Text/Pandoc/Shared, since they are now used only by the Docbook writer. + Rewrote using new Pandoc definition. (Because of the different treatment of footnotes, the "notes" parameter is no longer needed in the block and inline conversion functions.) * Updated test suite * Throughout: old haskell98 module names replaced by hierarchical module names, e.g. List by Data.List. * debian/control: Include libghc6-xhtml-dev instead of libghc6-html-dev in "Build-Depends." * cabalize: + Remove haskell98 from BASE_DEPENDS (since now the new hierarchical module names are being used throughout) + Added mtl to BASE_DEPENDS (needed for state monad) + Removed html from GHC66_DEPENDS (not needed since xhtml is now used) git-svn-id: https://pandoc.googlecode.com/svn/trunk@580 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-17Removed Blank block element as unnecessary.fiddlosopher1-1/+2
git-svn-id: https://pandoc.googlecode.com/svn/trunk@578 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-04Fixed bug in noscript part of email obfuscation:fiddlosopher1-2/+2
& instead of & git-svn-id: https://pandoc.googlecode.com/svn/trunk@557 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-02-27Changes to test suite for new XHTML output.fiddlosopher6-1030/+1223
git-svn-id: https://pandoc.googlecode.com/svn/trunk@550 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-27Cleaned up handling of embedded quotes in link titles.fiddlosopher3-9/+9
Now these are stored as a '"' character, not as '"'. The function escapeLinkTitle in the Markdown writer is unnecessary and was removed. Tests modified accordingly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@517 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-27More changes in entity handling: Instead of using entities for charactersfiddlosopher2-35/+35
above 128 in HTML and Docbook output, we now just use unicode. After all, we're declaring UTF-8 content in the header. This makes the HTML and docbook files produced by pandoc much more readable and editable. Changes to Entities.hs: + Removed specialCharToEntity + Added escapeSGMLChar (which just escapes the basic four, <>&") + Modified encodeEntities and stringToSGML to use escapeSGMLChar + Removed encodeEntitiesNumerical + Rewrote encodeEntities for better performance + Rewrote stringToSGML for better performance git-svn-id: https://pandoc.googlecode.com/svn/trunk@516 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-27Changes in entity handling:fiddlosopher3-36/+36
+ Entities are parsed (and unicode characters returned) in both Markdown and HTML readers. + Parsers characterEntity, namedEntity, decimalEntity, hexEntity added to Entities.hs; these parse a string and return a unicode character. + Changed 'entity' parser in HTML reader to use the 'characterEntity' parser from Entities.hs. + Added new 'entity' parser to Markdown reader, and added '&' as a special character. Adjusted test suite accordingly since now we get 'Str "AT",Str "&",Str "T"' instead of 'Str "AT&T".. + stringToSGML moved to Entities.hs. escapeSGML removed as redundant, given encodeEntities. + stringToSGML, encodeEntities, and specialCharToEntity are given a boolean parameter that causes only numerical entities to be used. This is used in the docbook writer. The HTML writer uses named entities where possible, but not all docbook-consumers know about the named entities without special instructions, so it seems safer to use numerical entities there. + decodeEntities is rewritten in a way that avoids Text.Regex, using the new parsers. + charToEntity and charToNumericalEntity added to Entities.hs. + Moved specialCharToEntity from Shared.hs to Entities.hs. + Removed unneeded 'decodeEntities' from 'str' parser in HTML and Markdown readers. + Removed sgmlHexEntity, sgmlDecimalEntity, sgmlNamedEntity, and sgmlCharacterEntity from Shared.hs. + Modified Docbook writer so that it doesn't rely on Text.Regex for detecting "mailto" links. git-svn-id: https://pandoc.googlecode.com/svn/trunk@515 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-24Modified Markdown writer to use autolinks when possible.fiddlosopher1-5/+4
So, instead of [site.com](site.com) we get <site.com>. Changed test suite accordingly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@508 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-24More smart quote bug fixes:fiddlosopher1-2/+2
+ LaTeX writer now handles consecutive quotes properly: for example, ``\,`hello'\,'' + LaTeX reader now parses '\,' as empty Str + normalizeSpaces function in Shared now removes empty Str elements + Modified tests accordingly git-svn-id: https://pandoc.googlecode.com/svn/trunk@506 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-15Added support for tables in markdown reader and in LaTeX,fiddlosopher7-1/+653
DocBook, and HTML writers. The syntax is documented in README. Tests have been added to the test suite. git-svn-id: https://pandoc.googlecode.com/svn/trunk@493 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09Reverted r471. My alternative to --strip-trailing-cr didn'tfiddlosopher1-2/+1
work. This only affects the test target on systems without GNU diff (rare), so I'm not too worried about it. git-svn-id: https://pandoc.googlecode.com/svn/trunk@480 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09Fixed docbook writer test -- removed named entities.fiddlosopher1-21/+20
git-svn-id: https://pandoc.googlecode.com/svn/trunk@474 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09Added comment relevant to last revision.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@472 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09Replaced diff --strip-trailing-cr with something more portablefiddlosopher1-1/+2
in runtests.pl. (This is a GNU option.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@471 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-07Added [breaklinks=true] to latex writer test case.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@453 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-07Modified HTML output for Image elements, to conform tofiddlosopher1-2/+2
Markdown.pl: + title attribute comes after alt attribute + title is included even if null git-svn-id: https://pandoc.googlecode.com/svn/trunk@445 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-06Fixed bug in Markdown reader's handling of underscores and otherfiddlosopher9-0/+21
inline formatting markers inside reference labels: for example, in '[A_B]: /url/a_b', the material between underscores was being parsed as emphasized inlines. git-svn-id: https://pandoc.googlecode.com/svn/trunk@442 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-06Merged changes from 'quotes' branch since r431. Smart typographyfiddlosopher16-982/+850
is now handled in the Markdown and LaTeX readers, rather than in the writers. The HTML writer has been rewritten to use the prettyprinting library. git-svn-id: https://pandoc.googlecode.com/svn/trunk@436 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-05Setup executable permissions on some files.roktas2-0/+0
git-svn-id: https://pandoc.googlecode.com/svn/trunk@423 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-05Changed Markdown writer so that it does not use the single-bracketfiddlosopher1-6/+6
style of implicit reference link. It now uses [this style][], not [this style]. Reason: only newer, beta versions of Markdown allow the single-bracket style. git-svn-id: https://pandoc.googlecode.com/svn/trunk@419 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-04Refactored SGML escaping functions and "in tag" functions tofiddlosopher6-63/+64
Text/Shared/Pandoc. (escapeSGML, stringToSGML, inTag, inTagSimple, inTagIndented, selfClosingTag) These can be used by both the HTML and Docbook writers. git-svn-id: https://pandoc.googlecode.com/svn/trunk@417 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-04+ Improved text wrapping algorithm in markdown, docbook, and RST writers.fiddlosopher1-1/+2
LineBreaks no longer cause ugly wrapping in Markdown output. + Replaced splitBySpace with the more general, polymorphic function splitBy (in Text/Pandoc/Shared). git-svn-id: https://pandoc.googlecode.com/svn/trunk@411 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-02Use entities for all characters above 127 in docbook output.fiddlosopher1-5/+5
Though XML tools should support unicode, some people will be using SGML tools, and these do not. Using entities makes the docbook files more portable. Also refactored encodeEntities and charToHtmlEntity in HtmlEntities.hs git-svn-id: https://pandoc.googlecode.com/svn/trunk@394 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-01Changed representation of code blocks to use <screen> andfiddlosopher1-11/+25
escaped characters rather than <programlisting> and CDATA. Reason: XML source more easily editable and readable. git-svn-id: https://pandoc.googlecode.com/svn/trunk@393 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-01Merged changes from docbook branch since r363.fiddlosopher3-0/+1003
git-svn-id: https://pandoc.googlecode.com/svn/trunk@386 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-30Merged 'strict' branch from r324. This adds a '--strict'fiddlosopher9-30/+30
option to pandoc, which forces it to stay as close as possible to official Markdown syntax. git-svn-id: https://pandoc.googlecode.com/svn/trunk@347 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-29Reversed changes from r246:fiddlosopher6-80/+0
+ Removed invisible anchors in front of header tags in HTML output. Reason: no way to prevent duplicate ID attributes (which is invalid HTML), since there might be duplicate header titles. See http://six.pairlist.net/pipermail/markdown-discuss/2005-January/000975.html. git-svn-id: https://pandoc.googlecode.com/svn/trunk@306 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-24+ Added --strip-trailing-cr option to diff in runtests.pl, so thatfiddlosopher3-3/+51
the test suite will work in Windows. + Converted some CR's to LF's in print.css and adjusted test suite accordingly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@290 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-24Changed default ASCIIMathML text color to black.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@289 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-21+ Added regression tests with footnotes in quote blocks and lists.fiddlosopher9-0/+78
+ This uncovered an existing bug in the RTF writer, which got indentation wrong on footnotes occuring in indented blocks like lists. Fixed this bug. git-svn-id: https://pandoc.googlecode.com/svn/trunk@263 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-20Made javascript obfuscation of emails even more obfuscatory,fiddlosopher2-4/+24
by combining it with entity obfuscation. git-svn-id: https://pandoc.googlecode.com/svn/trunk@254 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-20Modified the HTML writer to add invisible anchors to each sectionfiddlosopher6-0/+80
heading. The anchors are derived form the text of the section heading as described in README. This makes it easy to insert links that jump from one part of a document to another: for example, '[back to the Introduction](#Introduction)'. git-svn-id: https://pandoc.googlecode.com/svn/trunk@246 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-19+ Replaced 'comparing' combinator in markdown reader with 'compare'.fiddlosopher2-6/+12
'comparing' is from Data.Ord, which is not available in GHC 6.4. + Added line break after </li> in HTML footnote output, for easier inspection of the source. git-svn-id: https://pandoc.googlecode.com/svn/trunk@245 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-19Merged changes to footnotes branch r219-r240.fiddlosopher10-65/+85
git-svn-id: https://pandoc.googlecode.com/svn/trunk@241 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-19Changed footnote syntax to conform to the de facto standardfiddlosopher9-53/+49
for markdown footnotes. References are now like this[^1] rather than like this^(1). There are corresponding changes in the footnotes themselves. See the updated README for more details. git-svn-id: https://pandoc.googlecode.com/svn/trunk@230 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-16Changed 'putStrLn' to 'putStr' in Main.hs, and modified somefiddlosopher13-12/+1
of the readers to make spacing at end of output more consistent. Modified tests accordingly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@201 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-11-26Pandoc bug fixes:fiddlosopher4-38/+38
+ LaTeX reader did not parse metadata correctly. Now the title, author, and date are parsed correctly, and everything else in the preamble is skipped. + Simplified parsing of LaTeX command arguments and options. The function commandArgs now returns a list of arguments OR options (in whatever order they appear). The brackets are included, and a new stripFirstAndLast function is provided to strip them off when needed. This fixes a problem in dealing with \newcommand, etc. + Added a "try" before "parser" in definition of notFollowedBy' combinator. Adjusted the code using this combinator accordingly. + Changed handling of code blocks. Previously, some readers allowed trailing newlines, while others stripped them. Now, all readers strip trailing newlines in code blocks; writers insert a newline at the end of code blocks as needed. + Changed test suite to reflect these changes. git-svn-id: https://pandoc.googlecode.com/svn/trunk@137 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-10-30Improved LaTeX writer's handling of dashes:fiddlosopher1-1/+1
+ Recognize a double hyphen as an Em-dash, even when it occurs next to punctuation (e.g. a quotation mark). + Collapse space around Em-dashes. + Process quotes before dashes. This way (foo -- 'bar') will turn into (foo---`bar') instead of (foo---'bar'). git-svn-id: https://pandoc.googlecode.com/svn/trunk@49 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-10-29Changes to RTF writer:fiddlosopher1-266/+266
+ use Helvetica instead of Times New Roman as default font + specify \f0 in every \pard; otherwise font sizes are not registered properly + modify test of RTF writer accordingly git-svn-id: https://pandoc.googlecode.com/svn/trunk@32 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-10-17initial importfiddlosopher69-0/+12276
git-svn-id: https://pandoc.googlecode.com/svn/trunk@2 788f1e2b-df1e-0410-8736-df70ead52e1b