aboutsummaryrefslogtreecommitdiff
path: root/test/html-reader.native
AgeCommit message (Collapse)Author
2023-08-05Revert "Revert "Update #8764 command test for latest change to HTML table ↵John MacFarlane
parser (#8634)."" This reverts commit acbc382ff4b45b9818884779b1e7100de445383d.
2023-08-05Revert "Update TableBody RowHeadColumns caculation: change from max to min ↵John MacFarlane
(#8634)" This reverts commit f257c97170ba8db3b771135b98b198d5de2bdb5b. For the reason, see #8984. The change caused the "grid shape" of some tables to change.
2023-06-24Update TableBody RowHeadColumns caculation: change from max to min (#8634)Ruqi
This change sets RowHeadColumns to the minimum value of each row, which gives better results in cases where rows have different numbers of leading th tags.
2021-09-28Switch from pretty-simple to pretty-show for native output.John MacFarlane
Update tests. Reason: it turns out that the native output generated by pretty-simple isn't always readable by the native reader. According to https://github.com/cdepillabout/pretty-simple/issues/99 it is not a design goal of the library that the rendered values be readable using 'read'. This makes it unsuitable for our purposes. pretty-show is a bit slower and it uses 4-space indents (non-configurable), but it doesn't have this serious drawback.
2021-09-21Use pretty-simple to format native output.John MacFarlane
Previously we used our own homespun formatting. But this produces over-long lines that aren't ideal for diffs in tests. Easier to use something off-the-shelf and standard. Closes #7580. Performance is slower by about a factor of 10, but this isn't really a problem because native isn't suitable as a serialization format. (For serialization you should use json, because the reader is so much faster than native.)
2021-05-14HTML reader: keep h1 tags as normal headers (#7274)Albert Krewinkel
The tags `<title>` and `<h1 class="title">` often contain the same information, so the latter was dropped from the document. However, as this can lead to loss of information, the heading is now always retained. Use `--shift-heading-level-by=-1` to turn the `<h1>` into the document title, or a filter to restore the previous behavior. Closes: #2293
2020-11-27HTML reader tests: improve test coverage of new featuresAlbert Krewinkel
2020-11-27HTML reader: support body headers, row head columnsAlbert Krewinkel
Closes: #6312
2020-11-26HTML reader: improve support for table headers, footer, attributesAlbert Krewinkel
- `<tfoot>` elements are no longer added to the table body but used as table footer. - Separate `<tbody>` elements are no longer combined into one. - Attributes on `<thead>`, `<tbody>`, `<th>`/`<td>`, and `<tfoot>` elements are preserved.
2020-04-28Support new Underline element in readers and writers (#6277)Vaibhav Sagar
Deprecate `underlineSpan` in Shared in favor of `Text.Pandoc.Builder.underline`.
2020-04-15Use the new builders, modify readers to preserve empty headersdespresc
The Builder.simpleTable now only adds a row to the TableHead when the given header row is not null. This uncovered an inconsistency in the readers: some would unconditionally emit a header filled with empty cells, even if the header was not present. Now every reader has the conditional behaviour. Only the XWiki writer depended on the header row being always present; it now pads its head as necessary.
2020-04-15Adapt to the removal of the RowSpan, ColSpan, RowHeadColumns accessorsdespresc
2020-04-15Adapt to the newest Table type, fix some previous adaptation issuesdespresc
- Writers.Native is now adapted to the new Table type. - Inline captions should now be conditionally wrapped in a Plain, not a Para block. - The toLegacyTable function now lives in Writers.Shared.
2020-04-15Implement the new Table typedespresc
2019-10-24HTML reader/writer: Better handling of <q> with cite attribute (#5837)Ole Martin Ruud
* HTML reader: Handle cite attribute for quotes. If a `<q>` tag has a `cite` attribute, we interpret it as a Quoted element with an inner Span. Closes #5798 * Refactor url canonicalization into a helper function * Modify HTML writer to handle quote with cite. [0]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q
2019-05-27consolidate simple-table detection (#5524)Mauro Bieg
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.
2017-10-27Consistent underline for Readers (#2270)hftf
* 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-08-20Use pandoc-types 1.17.1. Tests updated for new simpleTable behavior...John MacFarlane
with empty headers.
2017-02-04Moved tests/ -> test/.John MacFarlane