summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Adjusted copyright notices to 2006-7; usefiddlosopher2007-07-07
| | | | | | | | real email address instead of lamely attempting to obfuscate. git-svn-id: https://pandoc.googlecode.com/svn/trunk@640 788f1e2b-df1e-0410-8736-df70ead52e1b
* Haddock documentation for Text.Pandoc.Blocks.fiddlosopher2007-07-07
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@638 788f1e2b-df1e-0410-8736-df70ead52e1b
* Man writer: Use integral n measures instead of fractional ifiddlosopher2007-07-07
| | | | | | | | | measures. Calculate on basis of a 70 character line, since the default is 78 but the table will appear indented 8 spaces in standard man output. git-svn-id: https://pandoc.googlecode.com/svn/trunk@637 788f1e2b-df1e-0410-8736-df70ead52e1b
* Put table of contents in its own div (id="toc").fiddlosopher2007-07-07
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@635 788f1e2b-df1e-0410-8736-df70ead52e1b
* HTML writer modifications:fiddlosopher2007-07-07
| | | | | | | | | | | | | | | + Added code to HTML Writer to generate a table of contents if the writerTableOfContents option is specified. This is an unordered list with links to the headers. It is constructed hierarchically, based on the order of the headers and their levels. + If a TOC is used, the headers become links back to the TOC. + Removed Toc from WriterState; instead, the TOC is generated at the top level, by the function tableOfContents. + Fixed a bug in uniqueIdentifiers which prevented it from handling more than one duplicate. git-svn-id: https://pandoc.googlecode.com/svn/trunk@634 788f1e2b-df1e-0410-8736-df70ead52e1b
* + Introduced writerIgnoreNotes option in WriterOptions. This is neededfiddlosopher2007-07-07
| | | | | | | | | | | for processing header blocks for a table of contents, since notes on headers should not appear in the TOC. Set default in Main.hs. + Moved Element, headerAtLeast, and hierarchicalize from Docbook writer to Text.Pandoc.Shared. This is because HTML writer now uses these in constructing a table of contents. git-svn-id: https://pandoc.googlecode.com/svn/trunk@633 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added writerTableOfContents to WriterOptions, and added afiddlosopher2007-07-07
| | | | | | | --table-of-contents/--toc command-line option to Main.hs. git-svn-id: https://pandoc.googlecode.com/svn/trunk@632 788f1e2b-df1e-0410-8736-df70ead52e1b
* Changes to HTML writer to incorporate automatic identifiers forfiddlosopher2007-07-07
| | | | | | | | | | | | | | | | | | | headers and table of contents: + WriterState now includes a list of header identifiers and a table of contents in addition to notes. + The function uniqueIdentifiers creates a list of unique identifiers from a list of inline lists (e.g. headers). + This list is part of WriterState and gets consumed by blockToHtml each time a header is encountered. + Headers are now printed with unique identifiers based on their names, e.g. Shell_scripts for "# Shell scripts". Fancy stuff like links, italics, etc. gets ignored. A numerical index is added to the end if there is already an identifier by the same name, e.g. "Shell_scripts1". + Provision has been made for a table-of-contents block element, but this has not yet been added. git-svn-id: https://pandoc.googlecode.com/svn/trunk@630 788f1e2b-df1e-0410-8736-df70ead52e1b
* Minor comment change.fiddlosopher2007-07-07
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@629 788f1e2b-df1e-0410-8736-df70ead52e1b
* Pandoc.hs: Export all definitions in Text.Pandoc.Definition,fiddlosopher2007-07-06
| | | | | | | rather than exporting the module. git-svn-id: https://pandoc.googlecode.com/svn/trunk@628 788f1e2b-df1e-0410-8736-df70ead52e1b
* Fixed bug in Markdown reader: links in footnotes were notfiddlosopher2007-07-06
| | | | | | | | | | | being processed. Solution: three-stage parse. First, get all the reference keys and add information to state. Next, get all the notes and add information to state. (Reference keys may be needed at this stage.) Finally, parse everything else. git-svn-id: https://pandoc.googlecode.com/svn/trunk@625 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added table support to RST writer.fiddlosopher2007-07-05
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@624 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added table support to markdown writer.fiddlosopher2007-07-04
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@623 788f1e2b-df1e-0410-8736-df70ead52e1b
* Improvements/bug fixes to Text.Pandoc.Blocksfiddlosopher2007-07-04
| | | | | | | library. git-svn-id: https://pandoc.googlecode.com/svn/trunk@622 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added Text.Pandoc.Blocks module for prettyprinting offiddlosopher2007-07-04
| | | | | | | text tables. git-svn-id: https://pandoc.googlecode.com/svn/trunk@620 788f1e2b-df1e-0410-8736-df70ead52e1b
* Man writer:fiddlosopher2007-07-04
| | | | | | | | | | - Added scheme for specifying manual section and additional headers: % PROGNAM | 1 | User Manual | Version 4.0 - Modified man page sources to include section 1 git-svn-id: https://pandoc.googlecode.com/svn/trunk@619 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added table support to man writer (using the tbl preprocessor).fiddlosopher2007-07-04
| | | | | | | | | | | | The writer state now includes a list of "preprocessor" codes. If the document contains a table, "t" (for "tbl") is added to the list. If this list is nonempty, the man page starts with .\" <list> which instructs man to run the file through the appropriate preprocessor before processing with groff. git-svn-id: https://pandoc.googlecode.com/svn/trunk@618 788f1e2b-df1e-0410-8736-df70ead52e1b
* Man writer: don't change - to \- (minus sign).fiddlosopher2007-07-02
| | | | | | | Leave them as hyphens. git-svn-id: https://pandoc.googlecode.com/svn/trunk@614 788f1e2b-df1e-0410-8736-df70ead52e1b
* Man writer: better output for line break:fiddlosopher2007-07-02
| | | | | | | | | .PD 0 # set interparagraph space to 0 .P # new paragraph .PD # reset interparagraph space to default. git-svn-id: https://pandoc.googlecode.com/svn/trunk@613 788f1e2b-df1e-0410-8736-df70ead52e1b
* Minor changes in Man writer:fiddlosopher2007-07-02
| | | | | | | | | | - escape ' as \[aq], because ' can trigger groff commands. - remove unneeded line breaks. - use CR font in code blocks. - use .P 0 for line breaks. git-svn-id: https://pandoc.googlecode.com/svn/trunk@612 788f1e2b-df1e-0410-8736-df70ead52e1b
* Modified escaping in Man writer. Also changedfiddlosopher2007-07-01
| | | | | | | format of footnote references and authors list. git-svn-id: https://pandoc.googlecode.com/svn/trunk@608 788f1e2b-df1e-0410-8736-df70ead52e1b
* Modified Main.hs and Pandoc.cabal to add man pagefiddlosopher2007-06-30
| | | | | | | writer. git-svn-id: https://pandoc.googlecode.com/svn/trunk@607 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added groff man writer.fiddlosopher2007-06-30
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@606 788f1e2b-df1e-0410-8736-df70ead52e1b
* Minor documentation changes to ASCIIMathML.hs template.fiddlosopher2007-06-17
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@602 788f1e2b-df1e-0410-8736-df70ead52e1b
* Require blankspace (but not multiple lines) between URL andfiddlosopher2007-05-10
| | | | | | | title in links and reference keys. (Markdown reader.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@599 788f1e2b-df1e-0410-8736-df70ead52e1b
* Fixed bug with indented blocks occurring in definition lists.fiddlosopher2007-05-10
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@598 788f1e2b-df1e-0410-8736-df70ead52e1b
* Improved prettyprinting of definition lists.fiddlosopher2007-05-10
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@596 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added support for definition lists in Docbook writer.fiddlosopher2007-05-09
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@595 788f1e2b-df1e-0410-8736-df70ead52e1b
* + Use new alignment parameter in title/author/date,fiddlosopher2007-05-09
| | | | | | | | 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
* Changes to RTF writer:fiddlosopher2007-05-03
| | | | | | | | | | | | + Added support for definition lists. + Removed extra '\cell' in table output, which caused a blank column to the left. + Added support for captions in tables. + Added an 'alignment' parameter to RTF block writers. + Added support for column alignments in tables. git-svn-id: https://pandoc.googlecode.com/svn/trunk@593 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added support for definition lists to RST writer.fiddlosopher2007-05-03
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@592 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added support for definition lists to markdownfiddlosopher2007-05-03
| | | | | | | writer. git-svn-id: https://pandoc.googlecode.com/svn/trunk@591 788f1e2b-df1e-0410-8736-df70ead52e1b
* Add -asxhtml flag to tidy in html2markdown. This willfiddlosopher2007-05-03
| | | | | | | perhaps help the parser. git-svn-id: https://pandoc.googlecode.com/svn/trunk@590 788f1e2b-df1e-0410-8736-df70ead52e1b
* Changed definition list syntax in markdown reader and simplifiedfiddlosopher2007-05-03
| | | | | | | | | | | | | | | | the parsing code. A colon is now required before every block in a definition. This fixes a problem with the old syntax, in which the last block in the following was ambiguous between a regular paragraph in the definition and a code block following the definition list: term : definition is this code or more definition? git-svn-id: https://pandoc.googlecode.com/svn/trunk@589 788f1e2b-df1e-0410-8736-df70ead52e1b
* Resolved issue #10: instead of adding "\n\n" to thefiddlosopher2007-04-22
| | | | | | | | | | end of strings in Main, do it in readMarkdown and readRST. (Note: the point of this is to ensure that a block at the end of the file gets treated as if it has blank space after it, which is generally what is wanted.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@588 788f1e2b-df1e-0410-8736-df70ead52e1b
* Fixed bug in anyLine parser. Previously anyLine would parse anfiddlosopher2007-04-22
| | | | | | | | empty string "". But it should fail on an empty string, or we get an error from its use inside "many" combinators. git-svn-id: https://pandoc.googlecode.com/svn/trunk@587 788f1e2b-df1e-0410-8736-df70ead52e1b
* Support for definition lists in LaTeX writer.fiddlosopher2007-04-21
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@586 788f1e2b-df1e-0410-8736-df70ead52e1b
* Fixed export declarations; removed unneeded import offiddlosopher2007-04-15
| | | | | | | Pandoc.Shared. git-svn-id: https://pandoc.googlecode.com/svn/trunk@585 788f1e2b-df1e-0410-8736-df70ead52e1b
* Moved escape and nullBlock parsers from ParserCombinators/Pandocfiddlosopher2007-04-15
| | | | | | | | | to Pandoc/Shared. Reason: ParserCombinators/Pandoc is for general-purpose parsers that don't require Pandoc.Definition. Also removed some unnecessary imports from Pandoc/Shared. git-svn-id: https://pandoc.googlecode.com/svn/trunk@584 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added Table to prettyBlock in Shared.hs.fiddlosopher2007-04-13
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@582 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added Text.Pandoc module that exports basic readers, writers,fiddlosopher2007-04-11
| | | | | | | definitions, and utility functions. git-svn-id: https://pandoc.googlecode.com/svn/trunk@581 788f1e2b-df1e-0410-8736-df70ead52e1b
* Extensive changes stemming from a rethinking of the Pandoc datafiddlosopher2007-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fixed bug in email obfuscation (issue #15). If the text to be obfuscatedfiddlosopher2007-04-08
| | | | | | | | contains an entity, this needs to be decoded before obfuscation. Thanks to thsutton for the patch. git-svn-id: https://pandoc.googlecode.com/svn/trunk@579 788f1e2b-df1e-0410-8736-df70ead52e1b
* Removed Blank block element as unnecessary.fiddlosopher2007-03-17
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@578 788f1e2b-df1e-0410-8736-df70ead52e1b
* Consolidated 'text', 'special', and 'inline' into 'inline'.fiddlosopher2007-03-17
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@577 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added trys to two list start routines. Reason:fiddlosopher2007-03-16
| | | | | | | | <|> only parses second parser when first hasn't consumed input. git-svn-id: https://pandoc.googlecode.com/svn/trunk@576 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added clauses for DefinitionList and Table to replaceReferenceLinks infiddlosopher2007-03-12
| | | | | | | | Text/Pandoc/Shared.hs. This ensures that reference-style links inside tables and definition lists will be handled properly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@575 788f1e2b-df1e-0410-8736-df70ead52e1b
* Simplified keyTable, using assumption that key blocks are notfiddlosopher2007-03-12
| | | | | | | | inside other block elements (an assumption that the Markdown reader uses in making its initial pass anyway). git-svn-id: https://pandoc.googlecode.com/svn/trunk@574 788f1e2b-df1e-0410-8736-df70ead52e1b
* Changes to Markdown reader relating to definition lists:fiddlosopher2007-03-11
| | | | | | | | | | | + fixed bug in indentSpaces (which didn't properly handle cases with mixed spaces and tabs) + rewrote definition list code to conform to new syntax + include definition lists in list block + failIfStrict on definition lists git-svn-id: https://pandoc.googlecode.com/svn/trunk@572 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added support for DefinitionList blocks to HTML writer.fiddlosopher2007-03-11
| | | | | | | | Cleaned up bullet and ordered list code by using ordList and unordList instead of raw olist and ulist. git-svn-id: https://pandoc.googlecode.com/svn/trunk@571 788f1e2b-df1e-0410-8736-df70ead52e1b