aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
AgeCommit message (Collapse)AuthorFilesLines
2014-04-04Added recognition of authorgroup element and releaseinfo element to DocBook ↵Matthew Pickering1-9/+16
reader. Closes #1214
2014-04-04Converted current meta information parsing in DocBook to a more extensible ↵Matthew Pickering1-34/+48
version which is aware of the more recent meta representation.
2014-04-01MediaWiki reader: Fixed bug in certain nested lists.John MacFarlane1-1/+2
The bug: If a level 2 list was followed by a level 1 list, the first item of the level 1 list would be lost. Closes #1213.
2014-04-01HTML reader: idiomatic rewriting for clarity.John MacFarlane1-5/+4
2014-04-01Changed the smart punctuation parser to return Inlines rather than an Inline ↵Matthew Pickering3-5/+3
element and updated files accordingly
2014-04-01Converted HTML reader to use builder. Fixes #1162.Matthew Pickering1-109/+126
2014-04-01Bugfix for #1175 and convert textile reader to use builder.Matthew Pickering1-134/+167
The reader did not correctly parse inline markup. The behavoir is now as follows. (a) The markup must start at the start of a line, be inside previous inline markup or be preceeded by whitespace. (b) The markup can not span across paragraphs (delimited by \n\n) (c) The markup can not be followed by a alphanumeric character. (d) Square brackets can be placed around the markup to avoid having to have white space before it. In order to make these changes it was either necessary to convert the parser to return a list of inlines or to convert the whole reader to use the builder. The latter approach whilst more work makes a bit more sense as it becomes easy to arbitarily append and prepend elements without changing the type. Tests are accordingly updated in a later commit to reflect the different normalisation behavoir specified by the builder monoid.
2014-03-25LaTeX reader: Better handling of figure and table with caption.John MacFarlane1-11/+34
We now look for a \caption inside the environment; if one is found, it is attached to the graphic or tabular found there. Closes #1204.
2014-03-25Revert "LaTeX reader: Added LPState."John MacFarlane1-18/+0
This reverts commit 82ddec698e782fef83dcd1b1fba79cd3b698c717.
2014-03-25LaTeX reader: Added LPState.John MacFarlane1-0/+18
Plan is to use this instead of ParserState in LP.
2014-03-25Parsing: Added HasMacros, simplified other typeclasses.John MacFarlane1-2/+2
Removed updateHeaderMap, setHeaderMap, getHeaderMap, updateIdentifierList, setIdentifierList, getIdentifierList.
2014-03-25API changes to HasReaderOptions, HasHeaderMap, HasIdentifierList.John MacFarlane1-8/+8
Previously these were typeclasses of monads. They've been changed to be typeclasses of states. This ismplifies the instance definitions and provides more flexibility. This is an API change! However, it should be backwards compatible unless you're defining instances of HasReaderOptions, HasHeaderMap, or HasIdentifierList. The old getOption function should work as before (albeit with a more general type). The function askReaderOption has been removed. extractReaderOptions has been added. getOption has been given a default definition. In HasHeaderMap, extractHeaderMap and updateHeaderMap have been added. Default definitions have been given for getHeaderMap, putHeaderMap, and modifyHeaderMap. In HasIdentifierList, extractIdentifierList and updateIdentifierList have been added. Default definitions have been given for getIdentifierList, putIdentifierList, and modifyIdentifierList. The ultimate goal here is to allow different parsers to use their own, tailored parser states (instead of ParserState) while still using shared functions.
2014-03-25LaTeX reader: Better handling of "table" environment.John MacFarlane1-0/+1
Positioning options no longer rendered verbatim. Partially addresses #1204.
2014-03-24Merge pull request #1068 from jaimeMF/mw-images-langsJohn MacFarlane1-1/+5
MediaWiki reader: Accept image links in more languages
2014-03-24Markdown reader: Fixed regression on line breaks in strict mode.John MacFarlane1-1/+1
Closes #1203.
2014-03-04Add a simple Emacs Org-mode readerAlbert Krewinkel1-0/+552
The basic structure of org-mode documents is recognized; however, org-mode features like todo markers, tags etc. are not supported yet.
2014-02-26Markdown reader: Improved parsing of nested divs.John MacFarlane1-0/+2
Formerly a closing div tag would be missed if it came right after other block-level tags.
2014-02-26Markdown parser: avoid backtracking when closing `</div>` not found.John MacFarlane1-6/+13
2014-02-26Markdown reader: small efficiency improvement.John MacFarlane1-1/+1
Switched `notFollewdBy' rawHtmlBlocks` -> `notFollowedBy' (htmlTag isBlockTag)`, which is more efficient.
2014-02-25Added readerTrace to ReaderOptions, --trace command line opt.John MacFarlane1-1/+11
This is to debug backtracking-related parsing bugs. So far it is only implemented for markdown, but it would be good to extend it to latex and html readers.
2014-02-21Fixed bug in reference link parsing in markdown_mmd.John MacFarlane1-1/+1
The bug was triggered by: Link to [Google][]. Link to [twitter][]. [Google]: http://google.com [twitter]: http://twitter.com
2014-02-19Make rst figures true figures. Closes #1168.John MacFarlane1-1/+1
Thanks to CasperVector.
2014-02-15Enhanced Pandoc's support for rST roles.Merijn Verstraaten1-10/+81
rST parser now supports: - All built-in rST roles - New role definition - Role inheritance Issues/TODO: - Silently ignores illegal fields on roles - Silently drops class annotations for roles - Only supports :format: fields with a single format for :raw: roles, requires a change to Text.Pandoc.Definition.Format to support multiple formats. - Allows direct use of :raw: role, rST only allows indirect (i.e., inherited use of :raw:).
2014-02-04Slight code reorganization in endline.John MacFarlane1-5/+3
2014-01-22Fixed mediawiki ordered list parsing.John MacFarlane1-10/+15
Closes #1122.
2014-01-20HTML reader: Fixed bug reading inline math with `$$`.John MacFarlane1-2/+2
See #225.
2014-01-16Merge pull request #974 from merijn/masterJohn MacFarlane1-6/+17
Added support for LaTeX style literate Haskell code blocks in rST.
2014-01-09Markdown parser: be more permissive about citation keys.John MacFarlane1-3/+4
Keys may now start with an underscore as well as a letter. Underscores do not count as internal punctuation, but are treated like alphanumerics, so "key:_2008" will work, as it did not before. (This change was necessary to use keys generated by zotero.) Closes #1111, closes #1011.
2014-01-07Markdown reader: Allow hard line breaks in table cells.John MacFarlane1-3/+3
The \-newline form must be used; the two-space+newline form won't work, since in a table cell nearly every line ends with two spaces.
2014-01-01HTML reader: Parse name/content pairs from meta tags as metadata.John MacFarlane1-1/+10
Closes #1106.
2013-12-19HLint: use fromMaybeHenry de Valence4-10/+12
Replace uses of `maybe x id` with `fromMaybe x`.
2013-12-19HLint: redundant parensHenry de Valence2-2/+2
Remove parens enclosing a single element.
2013-12-19HLint: use `elem` and `notElem`Henry de Valence2-7/+6
Replaces long conditional chains with calls to `elem` and `notElem`.
2013-12-17LaTeX reader: Support babel-style quoting: `` "`..."' ``.John MacFarlane1-0/+2
2013-12-16Docbook reader: Avoid failure if tbody contains no tr or row elements.John MacFarlane1-1/+3
2013-12-15Properly handle script blocks in strict mode.John MacFarlane1-1/+3
(That is, markdown-markdown_in_html_blocks.) Previously a spurious `<p>` tag was being added. Closes #1093.
2013-12-13LaTeX reader: add support for Verb macroJeff Arnold1-0/+1
2013-12-12Markdown reader: Fixed regression in title blocks.John MacFarlane1-4/+4
If author field was empty, date was being ignored. Closes #1089.
2013-12-07Another small performance improvement.John MacFarlane1-3/+5
2013-12-07Small performance improvement in list parsing.John MacFarlane1-2/+3
2013-12-07Markdown reader: Fixed bug with literal `</div>` in lists.John MacFarlane1-3/+4
Closes #1078.
2013-12-06HTML reader: Parse LaTeX math if appropriate options are set.John MacFarlane3-35/+10
* Moved inlineMath, displayMath from Markdown reader to Parsing. * Export them from Parsing. (API change.) * Generalize their types.
2013-12-04Stop parsing "list lines" when we hit a block tag.John MacFarlane1-1/+3
This fixes exponential slowdown in certain input, e.g. a series of lists followed by `</div>`.
2013-11-24MediaWiki reader: Accept image links in more languagesJaime Marquínez Ferrándiz1-1/+5
In some of the Wikipedia versions the local version of 'File' is used (for example 'Archivo' in Spanish)
2013-11-22Fixed bug with intraword emphasis.John MacFarlane1-1/+2
Closes #1066.
2013-11-18LaTeX reader: Parse contents of curly quotes or matched `"` as quotes.John MacFarlane1-7/+17
2013-11-17LaTeX reader: Support `\textnormal` as span with class "nodecor".John MacFarlane1-0/+1
This is needed for pandoc-citeproc.
2013-11-17MediaWiki reader: Add automatic header identifiers.John MacFarlane1-2/+20
2013-11-07recognize svg tag in HTML ReaderMinRK1-1/+1
avoids adding lots of `<p>` tags in embedded SVG content, for instance in markdown to HTML.
2013-11-03Markdown reader: Correctly handle empty bullet list items.John MacFarlane1-4/+5
For example: - one - - two This should NOT be parsed as a setext header followed by a list.