summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
Commit message (Collapse)AuthorAge
* More changes to avoid compiler warnings on ghc 7.10.John MacFarlane2015-10-14
| | | | | | * CPP around deprecated `parseTime`. * Text.Pandoc.Compat.Locale -> Text.Pandoc.Compat.Time, now exports Data.Time.
* Use custom Prelude to avoid compiler warnings.John MacFarlane2015-10-14
| | | | | | | | | | | | | - 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.
* HTML reader/writer: better handling of "section" elements.John MacFarlane2015-10-11
| | | | | | | | | | 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.
* Merge pull request #2412 from frerich/reader/docbook/xref_supportJohn MacFarlane2015-10-10
|\ | | | | Added support for <xref> tag in DocBook reader
| * Improve text generated for <xref> by employing docbook-xsl heuristicsFrerich Raabe2015-09-24
| | | | | | | | | | | | | | 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.
| * Added proper support for DocBook 'xref' elementsFrerich Raabe2015-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | '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.
| * Pass the parsed DocBook content along the state of readDocBookFrerich Raabe2015-09-23
| | | | | | | | | | | | | | | | | | | | | | 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.
| * Minor refactoring to readDocBookFrerich Raabe2015-09-23
| | | | | | | | | | | | 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.
* | LaTeX reader: don't eat excess whitespace after macros.John MacFarlane2015-10-09
| | | | | | | | Really close #2446.
* | LaTeX reader: don't eat whitespace after macro with only opt arg.John MacFarlane2015-10-09
| | | | | | | | Closes #2446.
* | Docx Reader: Parse soft, no-break hyphen elementsOphir Lifshitz2015-10-04
| |
* | Markdown reader: handle 'id' and 'class' in parsing key/value attrs.John MacFarlane2015-09-25
| | | | | | | | | | | | | | | | | | | | # Header {id="myid" class="foo bar"} is now equivalent to # Header {#myid .foo .bar} Closes #2396.
* | LaTeX reader: support longtable.John MacFarlane2015-09-23
|/ | | | Closes #2411.
* Make sure verse blocks can contain empty linesAlbert Krewinkel2015-09-19
| | | | | | | | | | | | 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.
* Merge pull request #2364 from gbataille/bugDocJohn MacFarlane2015-08-17
|\ | | | | [BUG] Haddock : * and ^ to be escaped in docs
| * [BUG] Haddock : * and ^ to be escaped in docsGrégory Bataille2015-08-17
| |
* | RST reader: better handling of indirect roles.John MacFarlane2015-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #2360 from jg/issue-2354John MacFarlane2015-08-15
|\ \ | | | | | | Org reader: add auto identifiers if not present on headers
| * | Org reader: add auto identifiers if not present on headersJuliusz Gonera2015-08-15
| | | | | | | | | | | | | | | | | | | | | Refs #2354 This should also fix the table of contents (--toc) when generating a html file from org input
* | | EPUB reader: stop mangling external URLs.John MacFarlane2015-08-10
|/ / | | | | | | | | | | | | Closes #2284. Note the changes to the test suite. In each case, a mangled external link has been fixed, so these are all positive.
* | MediaWiki reader: handle unquoted table attributes.John MacFarlane2015-08-08
| | | | | | | | Closes #2355.
* | HTML reader: add auto identifiers if not present on headers.John MacFarlane2015-08-08
| | | | | | | | | | | | | | | | 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.
* | DocBook reader: handle informalexample.John MacFarlane2015-08-08
| | | | | | | | | | | | It is parsed into a Div with class `informalexample`. Closes #2319.
* | LaTeX reader: Implement \Cite.John MacFarlane2015-08-08
| | | | | | | | See #2335.
* | Merge pull request #2327 from hftf/list-styleJohn MacFarlane2015-08-07
|\ \ | |/ |/| HTML Reader: Correctly parse inline list-style(-type) for <ol>
| * HTML Reader: Detect font-variant with pickStyleAttrPropsOphir Lifshitz2015-07-27
| |
| * HTML Reader: Parse <ol> type, class, and inline list-style(-type) CSSOphir Lifshitz2015-07-24
| |
* | Pipe tables: allow indented columns.John MacFarlane2015-07-27
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #1689 from kuribas/masterJohn MacFarlane2015-07-25
|\ \ | | | | | | Use '=' instead of '#' for atx-style headers in markdown+lhs.
| * | Use '=' instead of '#' for atx-style headers in markdown+lhs.Kristof Bastiaensen2014-10-14
| | |
* | | Added odt readerMarLinn2015-07-23
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Updated tests and removed a skipSpaces....John MacFarlane2015-07-23
| | | | | | | | | | we no longer need it with the change to toKey, and it is expensive to skip spaces after every inline.
* | Merge pull request #2323 from hftf/implicit-header-refsJohn MacFarlane2015-07-23
|\ \ | | | | | | Fix implicit header refs for headers with extra spaces
| * | Markdown Reader: Skip spaces in headersOphir Lifshitz2015-07-23
| | |
* | | LaTeX reader: support abstract environment.John MacFarlane2015-07-23
|/ / | | | | | | The abstract populates an "abstract" metadata field.
* | Fix regression: allow HTML comments containing `--`.John MacFarlane2015-07-21
| | | | | | | | | | | | | | 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.
* | HTML reader: handle type attribute on ol.John MacFarlane2015-07-21
| | | | | | | | | | | | E.g. `<ol type="i">`. Closes #2313.
* | LaTeX reader: properly handle booktabs lines.John MacFarlane2015-07-21
| | | | | | | | | | | | | | Lines aren't part of the pandoc table model, but we can just ignore them. Closes #2307.
* | Markdown reader: don't allow bare URI links or autolinks in link label.John MacFarlane2015-07-14
| | | | | | | | | | | | Added test cases. Closes #2300.
* | Avoid parsing partial URLs as HTML tags.John MacFarlane2015-07-10
| | | | | | | | Closes #2277.
* | Readers.RST: Factor out inline markup string parsingLars-Dominik Braun2015-07-03
| |
* | Readers.RST: Parse field list nameLars-Dominik Braun2015-07-03
| | | | | | | | | | | | “Inline markup is parsed in field names.” [1] [1] http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#field-lists
* | Merge pull request #2250 from PromyLOPh/rsttargetJohn MacFarlane2015-06-29
|\ \ | | | | | | Fix RST reference names with special characters
| * | Fix RST reference names with special charactersLars-Dominik Braun2015-06-29
| | |
* | | LaTeX reader: Allow `_` and `^` as regular inline text.John MacFarlane2015-06-29
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | LaTeX reader: don't parse `_`,`^` as super/sub outside math mode.John MacFarlane2015-06-29
|/ /
* | DocBook reader mediaobjects and figures, closes #2184mb212015-06-21
| |
* | HTML reader: allow `<body>` to close `<head>`.John MacFarlane2015-06-04
| |
* | Removed tab chars in Textile reader source.John MacFarlane2015-05-28
| |
* | Merge pull request #2170 from tarleb/org-generalize-result-blockJohn MacFarlane2015-05-26
|\ \ | | | | | | Org generalize result block