pandoc (0.4) unstable; urgency=low [ John MacFarlane ] * Added two new output formats: groff man pages and ConTeXt. By default, output files with extensions ".ctx" and ".context" are assumed to be ConTeXt, and output files with single-digit extensions are assumed to be man pages. * Added support for tables (with a new Table block element). Two kinds of tables are supported: a simple table with one-line rows, and a more complex variety with multiline rows. All output formats are supported, but only markdown tables are parsed at the moment. The syntax is documented in README. * Added support for definition lists (with a new DefinitionList block element). All output formats are supported, but only markdown definition lists are parsed at the moment. The syntax is documented in README. * Added a --toc|--table-of-contents option. This causes an automatically generated table of contents (or an instruction that creates one) to be inserted at the beginning of the document. Not supported in S5, DocBook, or man page writers. * Added Text.Pandoc module that exports basic readers, writers, definitions, and utility functions. This should export everything needed for most uses of Pandoc libraries. The haddock documentation includes a short example program. * Added Text.Pandoc.Blocks module to help in printing markdown and RST tables. This module provides functions for working with fixed-width blocks of text--e.g., placing them side by side, as in a table row. * Refactored to avoid reliance on Haskell's Text.Regex library, which (a) is slow, and (b) does not properly handle unicode. This fixed some strange bugs, e.g. in parsing S-cedilla, and improved performance. + Replaced 'gsub' with a general list function 'substitute' that does not rely on Text.Regex. + Rewrote extractTagType in HTML reader so that it doesn't use regexs. + In Markdown reader, replaced email regex test with a custom email autolink parser (autoLinkEmail). Also replaced selfClosingTag regex with a custom function isSelfClosingTag. + Modified Docbook writer so that it doesn't rely on Text.Regex for detecting 'mailto' links. + Removed escapePreservingRegex and reamped entity-handling functions in Text.Pandoc.Shared and Text.Pandoc.Entities to avoid reliance on Text.Regex (see below on Entity handling changes). * Removed Key and Note blocks from the Pandoc data structure. All links are now stored as explicit links, and note contents are stored with the (inline) notes. + All link Targets are now explicit (URL, title) pairs; there is no longer a 'Ref' target. + Markdown and RST parsers now need to extract data from key and note blocks and insert them into the relevant inline elements. Other parsers have been 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. + Several functions (generateReference, keyTable, replaceReferenceLinks, replaceRefLinksBlockList, and some auxiliaries used by them) have been removed from Text.Pandoc.Shared, since they are no longer needed. New functions and data structures (Reference, isNoteBlock, isKeyBlock, isLineClump) have been added. The functions inTags, selfClosingTag, inTagsSimple, and inTagsIndented have been moved to the DocBook writer, since that is now the only module that uses them. NoteTable is now exported in Text.Pandoc.Shared. + Added stateKeys and stateNotes to ParserState; removed stateKeyBlocks, stateKeysUsed, stateNoteBlocks, stateNoteIdentifiers, stateInlineLinks. + Added writerNotes and writerReferenceLinks to WriterOptions. * Changed handling of XML entities. Entities are now parsed (and unicode characters returned) in the Markdown and HTML readers, rather than being handled in the writers. In HTML and Docbook writers, UTF-8 is now used instead of entities for characters above 128. This makes the HTML and DocBook output much more readable and more easily editable. + Removed sgmlHexEntity, sgmlDecimalEntity, sgmlNamedEntity, and sgmlCharacterEntity regexes from Text.Pandoc.Shared. + Renamed escapeSGMLChar to escapeCharForXML. Added escapeStringForXML. + Added parsers characterEntity, namedEntity, decimalEntity, hexEntity to Entities.hs; these parse a string and return a unicode character. + Added new 'entity' parser to Markdown reader, and added '&' as a special character. + Changed 'entity' parser in HTML reader to use characterEntity. + Rewrote decodeEntities to use the new parsers instead of Text.Regex. + Modified HTML and Markdown readers to call decodeEntities on all raw strings (e.g. authors, dates, link titles), to ensure that no unprocessed entities are included in the native representation of the document. (In the HTML reader, most of this work is done by a change in extractAttributeName.) + In XML and Markdown output, escape unicode nonbreaking space as ' ', since a unicode non-breaking space is impossible to distinguish visually from a regular space. (Resolves Issue #3.) + Added charToEntity and charToNumericalEntity to Entities.hs. Removed encodeEntitiesNumerical. + Use Data.Map for entityTable and (new) reverseEntityTable, for a slight performance boost over the old association list. + Removed unneeded decodeEntities from 'str' parser in HTML and Markdown readers. * Text.Pandoc.UTF8: Renamed encodeUTF8 to toUTF8, decodeUTF8 to fromUTF8, for clarity. * Replaced old haskell98 module names replaced by hierarchical module names, e.g. List by Data.List. Removed haskell98 from dependencies in pandoc.cabal, and added mtl (needed for state monad). Substituted xhtml for html. * Removed Blank block element as unnecessary. * HTML writer: + Modified HTML writer to use the Text.XHtml library. This results in cleaner, faster code, and it makes it easier to use Pandoc in other projects, like wikis, which use Text.XHtml. Two functions are now provided, writeHtml and writeHtmlString: the former outputs an Html structure, the latter a rendered string. The S5 writer is also changed, in parallel ways (writeS5, writeS5String). + The Html header is now written programmatically, so it has been removed from the 'headers' directory. The S5 header is still needed, but the doctype and some of the meta declarations have been removed, since they are written programatically. This change introduces a new dependency on the xhtml package. + Fixed two bugs in email obfuscation involving improper escaping of '&' in the