aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2007-07-22Updated test suite for writers, adding tests forfiddlosopher11-1/+113
strikeout, superscript, subscript. git-svn-id: https://pandoc.googlecode.com/svn/trunk@766 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22Updated latex writer test because of new system forfiddlosopher1-6/+2
writing the preamble. git-svn-id: https://pandoc.googlecode.com/svn/trunk@761 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22Fixed newline issue at end of man page writer test.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@760 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22Changed /hfil/break to /crlf in ConTeXt writer test suite.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@759 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22Man writer:fiddlosopher1-2/+2
+ Make sure to include "" if no section is specified in a man page TH line. + Updated man writer tests. git-svn-id: https://pandoc.googlecode.com/svn/trunk@758 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-15Modified the test of a link containing an underscore infiddlosopher1-1/+1
both the label and the URL. The underscore must be backslash-escaped. git-svn-id: https://pandoc.googlecode.com/svn/trunk@730 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-15Changes to ConTeXt test suite.fiddlosopher1-25/+32
git-svn-id: https://pandoc.googlecode.com/svn/trunk@726 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-15Merged branches/context: addition of a ConTeXt writerfiddlosopher4-1/+853
<http://www.pragma-ade.nl/>. + Text.Pandoc.Writers.ConTeXt added. + Text.Pandoc modified to export the basic ConTeXt writer. + Main.hs modified to recognize 'context' as a writer. + ConTeXtHeader added to headers + DefaultHeaders.hs template modified to include ConTeXt header + Tests added (writer.context, tables.context), and runtests.pl modified to run them + pandoc.cabal updated to include Text.Pandoc.Writers.ConTeXt. git-svn-id: https://pandoc.googlecode.com/svn/trunk@716 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-14Change to footnotes in HTML writer: Instead of putting the footnotefiddlosopher1-15/+5
backlink on a line by itself, after the content of the note, we now put it at the end of the last paragraph of the footnote. This saves space and looks better. More specifically: + If the last block of the note is a Para or Plain block, the backlink is put at the end of that block's contents. + Otherwise, the backlink is put in a separate Plain block by itself, after the footnote's contents. git-svn-id: https://pandoc.googlecode.com/svn/trunk@697 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09Added a test case with an inline link containing bracketed text.fiddlosopher11-10/+16
git-svn-id: https://pandoc.googlecode.com/svn/trunk@667 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09Minor cosmetic changes to runtests.pl ("passed" infiddlosopher1-2/+2
lowercase, to distinguish more clearly from "FAILED"). git-svn-id: https://pandoc.googlecode.com/svn/trunk@666 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09+ Cleaned up runtests.pl. Incorporated table tests in loop withfiddlosopher3-39/+10
main writer tests. + Renamed tables.tex to tables.latex, tables.db to tables.docbook, for consistency with the writer tests. git-svn-id: https://pandoc.googlecode.com/svn/trunk@661 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09Text.Pandoc.Blocks:fiddlosopher1-29/+29
+ Fixed a bug in hPad, which previously padded the rightmost cell. This is fixed by introducing a case for a singleton list. + Fixed Markdown writer so that the space after a table is not nested two spaces. + Adjusted Markdown table tests accordingly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@660 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09Markdown writer:fiddlosopher1-5/+4
Fixed a small problem with lengths of dashed lines in tables. git-svn-id: https://pandoc.googlecode.com/svn/trunk@659 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08Regularized the scheme for unique header identifiers in HTML writer:fiddlosopher3-7/+7
- punctuation is now all removed (except -) - spaces are turned into - - all lowercase This scheme should be fairly predictable. Updated tests accordingly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@655 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08Changes to tests to accommodate r653.fiddlosopher5-48/+48
git-svn-id: https://pandoc.googlecode.com/svn/trunk@654 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08LaTeX writer:fiddlosopher1-0/+1
+ Leave extra blank line after \maketitle + Insert \tableofcontents if --toc option was selected Test suite: + extra blank line after \maketitle in writer.latex git-svn-id: https://pandoc.googlecode.com/svn/trunk@649 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08Added tests for man writer to runtests.pl.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@647 788f1e2b-df1e-0410-8736-df70ead52e1b
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 &amp; 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 '&quot;'. 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