aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/HTML.hs
AgeCommit message (Collapse)AuthorFilesLines
2019-09-28Use Prelude.fail to avoid ambiguity with fail from GHC.Base.John MacFarlane1-2/+2
2019-07-02Fix redundant constraint warnings. (#5625)Pete Ryland1-2/+2
2019-05-29HTML reader: misc. epub related fixes.John MacFarlane1-30/+41
- With epub extensions, check for epub:type in addition to type. - Fix problem with noteref parsing which caused block-level content to be eaten with the noteref. - Rename pAnyTag to pAny. - Refactor note resolution.
2019-05-27consolidate simple-table detection (#5524)Mauro Bieg1-7/+2
add `onlySimpleTableCells` to `Text.Pandoc.Shared` [API change] This fixes an inconsistency in the HTML reader, which did not treat tables with `<p>` inside cells as simple.
2019-05-25HTML reader: trim definition list termsAlexander Krotov1-1/+1
2019-03-25HTML reader: read `data-foo` attribute into `foo`.John MacFarlane1-1/+2
The HTML writer adds the `data-` prefix for HTML5 for nonstandard attributes. But the attributes are represented in the AST without the `data-` prefix, so we should strip this when reading HTML. Closes #5392.
2019-03-01Remove license boilerplate.John MacFarlane1-18/+0
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel1-2/+2
Quite a few modules were missing copyright notices. This commit adds copyright notices everywhere via haddock module headers. The old license boilerplate comment is redundant with this and has been removed. Update copyright years to 2019. Closes #4592.
2019-01-21HTML and markdown: treat textarea as a verbatim environment.John MacFarlane1-1/+3
We don't want to parse its contents as Markdown or HTML. Closes #5241.
2018-12-31Remove unused HasHeaderMap (#5175)Alexander1-6/+1
It is updated by some readers, but never actually used.
2018-12-17HTML reader: handle empty start attribute.John MacFarlane1-4/+2
See #5162.
2018-11-16HTML reader: allow tfoot before body rows.John MacFarlane1-2/+3
Closes #5079.
2018-11-15HTML reader: parse `<small>` as a Span with class "small".John MacFarlane1-0/+4
Closes #5080.
2018-11-13HTML reader: allow thead containing a row with td rather than th.John MacFarlane1-11/+11
See #5014. Note that this doesn't address the original issue in #5014, only an unrelated side-issue.
2018-10-11HTML reader: fix htmlTag and isInlineTag to accept processing instructions.John MacFarlane1-8/+10
Fixes regression #3123 (since 2.0). Added regression test.
2018-09-07HTML reader: parse `<script type="math/tex` tags as math.John MacFarlane1-0/+12
These are used by MathJax. Closes #4877.
2018-08-24HTML reader: allow enabling `raw_tex` extension.John MacFarlane1-3/+28
This now allows raw LaTeX environments, `\ref`, and `\eqref` to be parsed (which is helpful for translation HTML documents using MathJaX). Closes #1126.
2018-08-22HTML reader: extract spaces inside links instead of trimming themAlexander Krotov1-3/+3
Fixes #4845
2018-07-02Spellcheck commentsAlexander Krotov1-2/+2
2018-04-05Changes to tests to accommodate changes in pandoc-types.John MacFarlane1-2/+4
In https://github.com/jgm/pandoc-types/pull/36 we changed the table builder to pad cells. This commit changes tests (and two readers) to accord with this behavior.
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-03-16Monoid/Semiground cleanup relying on custom Prelude.John MacFarlane1-1/+1
2018-01-19hlint code improvements.John MacFarlane1-4/+4
2018-01-15HTML reader: Fix col width parsing for percentages < 10% (#4262)n3fariox1-3/+6
Rather than take user input, and place a "0." in front, actually calculate the percentage to catch cases where small column sizes (e.g. `2%`) are needed.
2018-01-05Update copyright notices to include 2018Albert Krewinkel1-2/+2
2017-12-27Fix warning.John MacFarlane1-2/+1
2017-12-27Small improvement to figcaption parsing. #4184.John MacFarlane1-2/+0
2017-12-27Merge pull request #4184 from mb21/html-reader-figcaptionJohn MacFarlane1-4/+7
HTML Reader: be more forgiving about figcaption
2017-12-27HTML reader: parse div with class `line-block` as LineBlock.John MacFarlane1-1/+13
See #4162.
2017-12-23HTML Reader: be more forgiving about figcaptionmb211-4/+7
fixes #4183
2017-12-06Markdown reader: accept processing instructions as raw HTML.John MacFarlane1-2/+3
Closes #4125.
2017-12-04Add `empty_paragraphs` extension.John MacFarlane1-4/+9
* Deprecate `--strip-empty-paragraphs` option. Instead we now use an `empty_paragraphs` extension that can be enabled on the reader or writer. By default, disabled. * Add `Ext_empty_paragraphs` constructor to `Extension`. * Revert "Docx reader: don't strip out empty paragraphs." This reverts commit d6c58eb836f033a48955796de4d9ffb3b30e297b. * Implement `empty_paragraphs` extension in docx reader and writer, opendocument writer, html reader and writer. * Add tests for `empty_paragraphs` extension.
2017-11-25Fix comment typo: s/elemnet/element/Alexander Krotov1-1/+1
2017-11-18HTML reader: ensure we don't produce level 0 headers,John MacFarlane1-5/+5
even for chapter sections in epubs. This causes problems because writers aren't set up to expect these. This fixes the most immediate problem in #4076. It would be good to think more about how to propagate the information that top-level headers are chapters from the reader to the writer.
2017-11-10HTML reader: hlintAlexander Krotov1-31/+30
2017-11-01Really fix #3989.John MacFarlane1-5/+12
The previous fix only worked in certain cases. Other cases with `>` in an HTML attribute broke.
2017-11-01hlintAlexander Krotov1-5/+5
2017-10-31Fixed regression in parsing of HTML comments in markdown...John MacFarlane1-2/+3
and other non-HTML formats (`Text.Pandoc.Readers.HTML.htmlTag`). The parser stopped at the first `>` character, even if it wasn't the end of the comment. Closes #4019.
2017-10-29Source code reformatting.John MacFarlane1-61/+63
2017-10-27Consistent underline for Readers (#2270)hftf1-1/+5
* Added underlineSpan builder function. This can be easily updated if needed. The purpose is for Readers to transform underlines consistently. * Docx Reader: Use underlineSpan and update test * Org Reader: Use underlineSpan and add test * Textile Reader: Use underlineSpan and add test case * Txt2Tags Reader: Use underlineSpan and update test * HTML Reader: Use underlineSpan and add test case
2017-10-24HTML reader: close td/th should close any open block tag...John MacFarlane1-0/+2
Closes #3991.
2017-10-24HTML reader: td should close an open th or td.John MacFarlane1-0/+1
2017-10-24Revert "HTML reader: td or th implicitly closes blocks within last td/th."John MacFarlane1-5/+1
This reverts commit d2c4243f89a6368d4f9f8a511d9b026d0be19cd8.
2017-10-24HTML reader: td or th implicitly closes blocks within last td/th.John MacFarlane1-1/+5
2017-10-23HTML reader: `htmlTag` improvements.John MacFarlane1-8/+19
We previously failed on cases where an attribute contained a `>` character. This patch fixes the bug. Closes #3989.
2017-09-17Added `--strip-comments` option, `readerStripComments` in `ReaderOptions`.John MacFarlane1-6/+10
* Options: Added readerStripComments to ReaderOptions. * Added `--strip-comments` command-line option. * Made `htmlTag` from the HTML reader sensitive to this feature. This affects Markdown and Textile input. Closes #2552.
2017-09-04HTML reader: Fix pattern match.John MacFarlane1-1/+1
2017-08-30HTML reader: improved handling of figure.John MacFarlane1-17/+17
Previously we had a parse failure if the figure contained anything besides an image and caption.
2017-08-17HTML reader: support column alignments.John MacFarlane1-13/+30
These can be set either with a `width` attribute or with `text-width` in a `style` attribute. Closes #1881.
2017-08-09HTML reader: parse <main> like <div role=main>. (#3791)bucklereed1-7/+11
* HTML reader: parse <main> like <div role=main>. * <main> closes <p> and behaves like a block element generally