aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
AgeCommit message (Collapse)AuthorFilesLines
2015-10-15LaTeX reader: fixed longtable support.John MacFarlane1-1/+1
2015-10-14More changes to avoid compiler warnings on ghc 7.10.John MacFarlane1-1/+1
* CPP around deprecated `parseTime`. * Text.Pandoc.Compat.Locale -> Text.Pandoc.Compat.Time, now exports Data.Time.
2015-10-14Use custom Prelude to avoid compiler warnings.John MacFarlane24-45/+10
- The (non-exported) prelude is in prelude/Prelude.hs. - It exports Monoid and Applicative, like base 4.8 prelude, but works with older base versions. - It exports (<>) for mappend. - It hides 'catch' on older base versions. This allows us to remove many imports of Data.Monoid and Control.Applicative, and remove Text.Pandoc.Compat.Monoid. It should allow us to use -Wall again for ghc 7.10.
2015-10-11HTML reader/writer: better handling of "section" elements.John MacFarlane1-3/+10
Previously `<section>` tags were just parsed as raw HTML blocks. With this change, section elements are parsed as Div elements with the class "section". The HTML writer will use `<section>` tags to render these Divs in HTML5; otherwise they will be rendered as `<div class="section">`. Closes #2438.
2015-10-10Merge pull request #2412 from frerich/reader/docbook/xref_supportJohn MacFarlane1-5/+37
Added support for <xref> tag in DocBook reader
2015-10-09LaTeX reader: don't eat excess whitespace after macros.John MacFarlane1-4/+4
Really close #2446.
2015-10-09LaTeX reader: don't eat whitespace after macro with only opt arg.John MacFarlane1-1/+3
Closes #2446.
2015-10-04Docx Reader: Parse soft, no-break hyphen elementsOphir Lifshitz2-1/+7
2015-09-25Markdown reader: handle 'id' and 'class' in parsing key/value attrs.John MacFarlane1-1/+5
# Header {id="myid" class="foo bar"} is now equivalent to # Header {#myid .foo .bar} Closes #2396.
2015-09-24Improve text generated for <xref> by employing docbook-xsl heuristicsFrerich Raabe1-2/+16
docbook-xsl, a set of XSLT scripts to generate HMTL out of DocBook, tries harder to generate a nice xref text. Depending on the element being linked to, it looks at the title or other descriptive child elements. Let's do that, too.
2015-09-24Added proper support for DocBook 'xref' elementsFrerich Raabe1-2/+18
'xref' is used to create cross references to other parts of the document. It is an empty element - the cross reference text depends on various attributes. Quoting 'DocBook: The Definitive Guide': 1. If the endterm attribute is specified on xref, the content of the element pointed to by endterm will be used as the text of the cross-reference. 2. Otherwise, if the object pointed to has a specified XRefLabel, the content of that attribute will be used as the cross-reference text.
2015-09-23Pass the parsed DocBook content along the state of readDocBookFrerich Raabe1-2/+4
Having access to the entire document will be needed when handling elements which refer to other elements. This is needed for e.g. <xref> or <link>, both of which reference other elements (by the 'id' attribute) for the label text. I suppose that in practice, the [Content] returned by parseXML always only contains one 'Elem' value -- the document element. However, I'm not totally sure about it, so let's just pass all the Content along.
2015-09-23Minor refactoring to readDocBookFrerich Raabe1-2/+2
I plan to use the parsed and normalized XML tree read in readDocBook in other places - prepare that commit by factoring this code out into a separate, shared, definition.
2015-09-23LaTeX reader: support longtable.John MacFarlane1-0/+2
Closes #2411.
2015-09-19Make sure verse blocks can contain empty linesAlbert Krewinkel1-1/+1
The previous verse parsing code made the faulty assumption that empty strings are valid (and empty) inlines. This isn't the case, so lines are changed to contain at least a newline. It would generally be nicer and faster to keep the newlines while splitting the string. However, this would require more code, which seems unjustified for a simple (and fairly rare) block as *verse*. This fixes #2402.
2015-08-17Merge pull request #2364 from gbataille/bugDocJohn MacFarlane1-6/+6
[BUG] Haddock : * and ^ to be escaped in docs
2015-08-17[BUG] Haddock : * and ^ to be escaped in docsGrégory Bataille1-6/+6
2015-08-15RST reader: better handling of indirect roles.John MacFarlane1-9/+11
Previously the parser failed on this kind of case .. role:: indirect(code) .. role:: py(indirect) :language: python :py:`hi` Now it currectly recognizes `:py:` as a code role. The previous test for this didn't work, because the name of the indirect role was the same as the language defined its parent, os it didn't really test for this behavior. Updated test.
2015-08-15Merge pull request #2360 from jg/issue-2354John MacFarlane1-1/+16
Org reader: add auto identifiers if not present on headers
2015-08-15Org reader: add auto identifiers if not present on headersJuliusz Gonera1-1/+16
Refs #2354 This should also fix the table of contents (--toc) when generating a html file from org input
2015-08-10EPUB reader: stop mangling external URLs.John MacFarlane1-8/+1
Closes #2284. Note the changes to the test suite. In each case, a mangled external link has been fixed, so these are all positive.
2015-08-08MediaWiki reader: handle unquoted table attributes.John MacFarlane1-2/+2
Closes #2355.
2015-08-08HTML reader: add auto identifiers if not present on headers.John MacFarlane1-7/+17
This makes TOC linking work properly. The same thing needs to be done to the org reader to fix #2354; in addition, `Ext_auto_identifiers` should be added to the list of default extensions for org in Text.Pandoc.
2015-08-08DocBook reader: handle informalexample.John MacFarlane1-1/+4
It is parsed into a Div with class `informalexample`. Closes #2319.
2015-08-08LaTeX reader: Implement \Cite.John MacFarlane1-0/+1
See #2335.
2015-08-07Merge pull request #2327 from hftf/list-styleJohn MacFarlane1-23/+35
HTML Reader: Correctly parse inline list-style(-type) for <ol>
2015-07-27HTML Reader: Detect font-variant with pickStyleAttrPropsOphir Lifshitz1-6/+5
2015-07-27Pipe tables: allow indented columns.John MacFarlane1-1/+3
Previously the left-hand column could not start with 4 or more spaces indent. This was inconvenient for right-aligned left columns. Note that the first (header column) must still have 3 or fewer spaces indentation, or the table will be treated as an indented code block.
2015-07-25Merge pull request #1689 from kuribas/masterJohn MacFarlane1-3/+9
Use '=' instead of '#' for atx-style headers in markdown+lhs.
2015-07-24HTML Reader: Parse <ol> type, class, and inline list-style(-type) CSSOphir Lifshitz1-17/+30
2015-07-23Added odt readerMarLinn12-0/+4121
Fully implemented features: * Paragraphs * Headers * Basic styling * Unordered lists * Ordered lists * External Links * Internal Links * Footnotes, Endnotes * Blockquotes Partly implemented features: * Citations Very basic, but pandoc can't do much more * Tables No headers, no sizing, limited styling
2015-07-23Updated tests and removed a skipSpaces....John MacFarlane1-1/+0
we no longer need it with the change to toKey, and it is expensive to skip spaces after every inline.
2015-07-23Merge pull request #2323 from hftf/implicit-header-refsJohn MacFarlane1-0/+2
Fix implicit header refs for headers with extra spaces
2015-07-23LaTeX reader: support abstract environment.John MacFarlane1-0/+1
The abstract populates an "abstract" metadata field.
2015-07-23Markdown Reader: Skip spaces in headersOphir Lifshitz1-0/+2
2015-07-21Fix regression: allow HTML comments containing `--`.John MacFarlane1-4/+4
Technically this isn't allowed in an HTML comment, but we've always allowed it, and so do most other implementations. It is handy if e.g. you want to put command line arguments in HTML comments.
2015-07-21HTML reader: handle type attribute on ol.John MacFarlane1-1/+8
E.g. `<ol type="i">`. Closes #2313.
2015-07-21LaTeX reader: properly handle booktabs lines.John MacFarlane1-1/+10
Lines aren't part of the pandoc table model, but we can just ignore them. Closes #2307.
2015-07-14Markdown reader: don't allow bare URI links or autolinks in link label.John MacFarlane1-0/+2
Added test cases. Closes #2300.
2015-07-10Avoid parsing partial URLs as HTML tags.John MacFarlane1-1/+8
Closes #2277.
2015-07-03Readers.RST: Factor out inline markup string parsingLars-Dominik Braun1-15/+11
2015-07-03Readers.RST: Parse field list nameLars-Dominik Braun1-1/+1
“Inline markup is parsed in field names.” [1] [1] http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#field-lists
2015-06-29Merge pull request #2250 from PromyLOPh/rsttargetJohn MacFarlane1-1/+1
Fix RST reference names with special characters
2015-06-29LaTeX reader: Allow `_` and `^` as regular inline text.John MacFarlane1-1/+1
Normally these will cause an error in LaTeX, but there are contexts (e.g. `alltt` environments) where they are okay. Now that we aren't treating them as super/subscript outside of math mode, it seems okay to parse them as regular text.
2015-06-29LaTeX reader: don't parse `_`,`^` as super/sub outside math mode.John MacFarlane1-2/+0
2015-06-29Fix RST reference names with special charactersLars-Dominik Braun1-1/+1
2015-06-21DocBook reader mediaobjects and figures, closes #2184mb211-11/+20
2015-06-04HTML reader: allow `<body>` to close `<head>`.John MacFarlane1-0/+1
2015-05-28Removed tab chars in Textile reader source.John MacFarlane1-2/+2
2015-05-26Merge pull request #2170 from tarleb/org-generalize-result-blockJohn MacFarlane1-16/+21
Org generalize result block