aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
AgeCommit message (Collapse)AuthorFilesLines
2014-04-16Org reader: introduce Reader environment around Blocks/InlinesAlbert Krewinkel1-130/+176
This introduces a Reader environment in the style of Text.Pandoc.Parsing.F, but adapted to the Org reader parser.
2014-04-16Org reader: Fix code for subexpression parsingAlbert Krewinkel1-21/+4
2014-04-16Org reader: Better module description, minor style changesAlbert Krewinkel1-6/+6
Use module description analogous to the markdown reader's. Use (<$) where it makes sense.
2014-04-13Merge pull request #1239 from tarleb/org-linebreakJohn MacFarlane1-0/+4
Org linebreaks
2014-04-13Merge pull request #1238 from tarleb/org-figuresJohn MacFarlane1-8/+49
Org reader: Add support for figures
2014-04-12Org reader: Removed ANN pragma.John MacFarlane1-3/+0
This relies on Template Haskell, which causes problems in Windows due to libraries with C dependencies. We need to avoid using TH in pandoc code.
2014-04-12Org reader: Read linebreaksAlbert Krewinkel1-0/+4
Linebreaks are marked by the string `\\` at the end of a line.
2014-04-12Org reader: Add support for figuresAlbert Krewinkel1-8/+49
Support for figures (images with name and caption) is added.
2014-04-11HTML reader: Treat processing instructions & declarations as block.John MacFarlane1-5/+9
Previously these were treated as inline, and included in paragraph tags in HTML or DocBook output, which is generally not what is wanted. Closes #1233.
2014-04-11Org reader: Fix parsing of sub-/superscript expressionsAlbert Krewinkel1-10/+37
This fixes the org-reader's handling of sub- and superscript expressions. Simple expressions (like `2^+10`), expressions in parentheses (`a_(n+1)`) and nested sexp (like `a_(nested()parens)`) are now read correctly.
2014-04-10MediaWiki reader: Handle table rows containing just an HTML comment.John MacFarlane1-1/+2
Closes #1230.
2014-04-10Org reader: Improve code by following HLint recommendationsAlbert Krewinkel1-20/+24
HLint's recommendations for better code are applied to the Org-mode reader code.
2014-04-10Org reader: Support more inline/display math variantsAlbert Krewinkel1-2/+26
Support all of the following variants as valid ways to define inline or display math inlines: - `\[..\]` (display) - `$$..$$` (display) - `\(..\)` (inline) - `$..$` (inline) This closes #1223. Again.
2014-04-09Merge pull request #1226 from tarleb/org-emphasis-readerJohn MacFarlane1-120/+260
Org reader: Precise rules for the recognition of markup
2014-04-09Org reader: Precise rules for the recognition of markupAlbert Krewinkel1-120/+260
The inline parsers have been rewritten using the org source code as a reference. This fixes a couple of bugs related to erroneous markup recognition.
2014-04-07Textile reader: Improved link parsing.John MacFarlane1-19/+15
In particular we now pick up on attributes. Since pandoc links can't have attributes, we enclose the whole link in a span if there are attributes. Closes #1008.
2014-04-07Merge pull request #1224 from tarleb/org-mathJohn MacFarlane1-37/+53
Org reader: Read inline math, recognize definition lists
2014-04-07Org reader: Support inline math (like $E=mc^2$)Albert Krewinkel1-6/+16
Closes #1223.
2014-04-06LaTeX reader: handle @{} and p{length} in tabular.John MacFarlane1-2/+3
The length is not actually recorded, but at least we get a table. Closes #1180.
2014-04-06Org reader: Add support for definition listsAlbert Krewinkel1-1/+16
2014-04-06Org reader: Minor code clean-upAlbert Krewinkel1-30/+21
2014-04-05HTML reader: Updated `closes` with rules from HTML5 spec.John MacFarlane1-5/+12
2014-04-05Textile reader: Better support for attributes.John MacFarlane1-9/+12
Instead of being ignored, attributes are now parsed and included in Span inlines. The output will be a bit different from stock textile: e.g. for `*(foo)hi*`, we'll get `<em><span class="foo">hi</span></em>` instead of `<em class="foo">hi</em>`. But at least the data is not lost.
2014-04-05Textile reader: Improved treatment of HTML spans (%).John MacFarlane1-5/+1
Closes #1115.
2014-04-05Removed whitespace at ends of lines.John MacFarlane1-15/+15
2014-04-05Org reader: Added type signature.John MacFarlane1-0/+1
2014-04-05Merge pull request #1219 from tarleb/org-imagesJohn MacFarlane1-57/+127
Org-reader: support inline images, clean-up code, fix bugs
2014-04-05Org reader: Support inline imagesAlbert Krewinkel1-10/+24
2014-04-05Org reader: Provide more language identifier translationsAlbert Krewinkel1-1/+8
Org-mode and Pandoc use different language identifiers, marking source code as being written in a certain programming language. This adds more translations from identifiers as used in Org to identifiers used in Pandoc. The full list of identifiers used in Org and Pandoc is available through http://orgmode.org/manual/Languages.html and `pandoc -v`, respectively.
2014-04-05Org reader: Fix parsing of nested inlinesAlbert Krewinkel1-7/+20
Text such as /*this*/ was not correctly parsed as a strong, emphasised word. This was due to the end-of-word recognition being to strict as it did not accept markup chars as part of a word. The fix involves an additional parser state field, listing the markup chars which might be parsed as part of a word.
2014-04-05Org reader: Use specialized org parser stateAlbert Krewinkel1-7/+41
The default pandoc ParserState is replaced with `OrgParserState`. This is done to simplify the introduction of new state fields required for efficient Org parsing.
2014-04-05Org reader: Slight cleaning of table parsing codeAlbert Krewinkel1-33/+35
2014-04-04DocBook reader: Better treatment of formalpara.John MacFarlane1-3/+3
We now emit the title (if present) as a separate paragraph with boldface text. Closes #1215.
2014-04-04DocBook reader: set metadata "author" not "authors"John MacFarlane1-1/+1
2014-04-04Removed trailing whitespace.John MacFarlane1-15/+15
2014-04-04DocBook reader: set "author" not "authors".John MacFarlane1-3/+3
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