aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/HTML.hs
AgeCommit message (Collapse)AuthorFilesLines
2014-07-11Removed (>>~) functionMatthew Pickering1-3/+3
This function is equivalent to the more general (<*) which is defined in Control.Applicative. This change makes pandoc code easier to understand for those not familar with the codebase.
2014-07-07HTML reader: adjust `blockTags` and `eitherBlockOrInline`.John MacFarlane1-9/+13
- Added `audio` and `source` in `eitherBlockOrInline`. - Moved `video`, `svg`, `progress`, `script`, `noscript`, `svg` from `blockTags` to `eitherBlockOrInline`. - `map` and `object` were mistakenly in both lists; they have been removed from `blockTags`.
2014-06-20HTML reader: Fix performance issue with malformed HTML tables.John MacFarlane1-0/+2
We let a `</table>` tag close an open `<tr>` or `<td>`. Closes #1167.
2014-06-20Support --trace in HTML reader.John MacFarlane1-1/+10
2014-06-19HTML reader: Allow space between `<col>` and `</col>`.John MacFarlane1-0/+1
Test case: ``` <table border="1"> <colgroup> <col> </col> <col></col> </colgroup> <tbody> <tr> <td>X</td> <td>Y</td> </tr> <tr> <td>1</td> <td>2</td> </tr> </tbody> </table> ```
2014-06-16HTML reader: Fixed major parsing problem with HTML tables.John MacFarlane1-15/+11
Table cells were being combined into one cell. Closes #1341.
2014-06-16Moved extractSpaces to Shared.hsmpickering1-13/+4
Generalised and move the extractSpaces function from `HTML.hs` to `Shared.hs` so that the docx reader can also use it.
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel1-2/+2
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-05HTML reader: Updated `closes` with rules from HTML5 spec.John MacFarlane1-5/+12
2014-04-01HTML reader: idiomatic rewriting for clarity.John MacFarlane1-5/+4
2014-04-01Converted HTML reader to use builder. Fixes #1162.Matthew Pickering1-109/+126
2014-01-20HTML reader: Fixed bug reading inline math with `$$`.John MacFarlane1-2/+2
See #225.
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 Valence1-2/+2
Replace uses of `maybe x id` with `fromMaybe x`.
2013-12-06HTML reader: Parse LaTeX math if appropriate options are set.John MacFarlane1-1/+8
* Moved inlineMath, displayMath from Markdown reader to Parsing. * Export them from Parsing. (API change.) * Generalize their types.
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-03HTML reader: Use pandoc Div and Span for raw "<div>", "<span>".John MacFarlane1-10/+25
Only if --parse-raw.
2013-08-10Adjustments for new Format newtype.John MacFarlane1-2/+2
2013-07-16HTML reader: read widths from col tags if present.John MacFarlane1-6/+23
Closes #893.
2013-07-16HTML reader: Handle non-simple tables (#893).John MacFarlane1-3/+9
Column widths are divided equally. TODO: Get column widths from col tags if present.
2013-07-16HTML reader: Generalized table parser.John MacFarlane1-4/+9
This commit doesn't change the present behavior at all, but it will make it easier to support non-simple tables in the future.
2013-06-24Use new flexible metadata type.John MacFarlane1-23/+20
* Depend on pandoc 1.12. * Added yaml dependency. * `Text.Pandoc.XML`: Removed `stripTags`. (API change.) * `Text.Pandoc.Shared`: Added `metaToJSON`. This will be used in writers to create a JSON object for use in the templates from the pandoc metadata. * Revised readers and writers to use the new Meta type. * `Text.Pandoc.Options`: Added `Ext_yaml_title_block`. * Markdown reader: Added support for YAML metadata block. Note that it must come at the beginning of the document. * `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`, `stateAuthors`, `stateDate` with `stateMeta`. * RST reader: Improved metadata. Treat initial field list as metadata when standalone specified. Previously ALL fields "title", "author", "date" in field lists were treated as metadata, even if not at the beginning. Use `subtitle` metadata field for subtitle. * `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string instead of a compiled template.. * OPML template: Use 'for' loop for authors. * Org template: '#+TITLE:' is inserted before the title. Previously the writer did this.
2013-03-28Parsing: Better error reporting in readWith.John MacFarlane1-1/+4
- Specialize readWith to String input. - On error have it print the line in which the error occurred, with a caret pointing to the column. - This should help diagnose parsing problems in LaTeX especially.
2013-02-16HTML reader: Preserve all header attributes.John MacFarlane1-2/+4
2013-01-30HTML reader: Handle colgroup tag.John MacFarlane1-1/+2
2013-01-12HTML reader: Added html5 tags to list of block-level tags.John MacFarlane1-5/+8
2013-01-09Added Attr field to Header.John MacFarlane1-2/+4
Previously header ids were autogenerated by the writers. Now they are generated (unless supplied explicitly) in the markdown parser, if the `header_identifiers` extension is selected. In addition, the textile reader now supports id attributes on headers.
2012-09-15HTML reader: Modified htmlTag for fewer false positives.John MacFarlane1-1/+1
A tag must start with `<` followed by `!`,`?`, `/`, or a letter. This makes it more useful in the wikimedia and markdown parsers.
2012-09-13MediaWiki reader: Use MWState instead of ParserState.John MacFarlane1-1/+1
2012-09-09HTML reader: Handle nested `<q>` tags properly.John MacFarlane1-1/+9
2012-09-09HTML reader: Parse <q> as Quoted DoubleQuote.John MacFarlane1-0/+4
2012-08-15Moved renderTags' from HTML reader & SelfContained to Shared.John MacFarlane1-13/+1
Improved removal of markdown="1" attribute in Markdow reader.
2012-07-26Fixed whitespace errors.John MacFarlane1-5/+5
2012-07-26Use readerExtensions instead of readerStrict in readers.John MacFarlane1-26/+19
Test individually for the extensions.
2012-07-25Changed reader parameters from ParserState to ReaderOptions.John MacFarlane1-3/+3
2012-07-25Moved ParseRaw from ParserState to ReaderOptions.John MacFarlane1-4/+4
2012-07-25Options -> ReaderOptions.John MacFarlane1-2/+2
Better to keep reader and writer options separate.
2012-07-25Put smart, strict in separate options field in state.John MacFarlane1-2/+3
This is the beginning of a larger transition that will make Options, not ParserState, the parameter of the read functions. (Options will also be used in writers, in place of WriterOptions.) Next step is to remove strict, replacing it with granular tests for different extensions.
2012-07-24HTML reader: Fixed bug in htmlBalanced.John MacFarlane1-2/+1
This caused hangs in parsing certain markdown input using --strict.
2012-07-20Use Parser as type synonym for Parsec.John MacFarlane1-8/+8
2012-07-20Text.Pandoc.Parsing: Export all Parsec functions used in pandoc code.John MacFarlane1-2/+0
No other module directly imports Parsec. This will make it easier to change the parsing backend in the future, if we want to.
2012-07-20Use Text.Parsec instead of Text.ParserCombinators.Parsec.John MacFarlane1-12/+12
2012-04-29HTML reader: Support `<col>` and `<caption>` in tables.John MacFarlane1-1/+3
Closes #486.
2012-04-28HTML reader: Don't skip nonbreaking spaces.John MacFarlane1-1/+7
Previously a paragraph containing just `&nbsp;` would be rendered as an empty paragraph. Thanks to Paul Vorbach for pointing out the bug.
2012-02-17Don't escape `<` in `<style>` tags with `--self-contained`.John MacFarlane1-2/+10
Closes #422: highlighting lost using `--self-contained`.
2012-01-12Added "title" to list of docbook block-level tags.John MacFarlane1-1/+1
2011-12-29Better smart quote parsing.John MacFarlane1-2/+6
* Added stateLastStrPos to ParserState. This lets us keep track of whether we're parsing the position immediately after a 'str'. If we encounter a ' in such a location, it must be an apostrophe, and can't be a single quote start. * Set this in the markdown, textile, html, and rst str parsers. * Closes #360.
2011-10-25HTML reader now recognizes DocBook block and inline tags.John MacFarlane1-5/+24
It was always possible to include raw DocBook tags in a markdown document, but now pandoc will be able to distinguish block from inline tags and behave accordingly. Thus, for example, <sidebar> hello </sidebar> will not be wrapped in `<para>` tags.
2011-08-01HTML reader: Fixed bug parsing tables w both thead and tbody.John MacFarlane1-0/+1
See bug #274, which was not completely fixed by the last patch.