Commit Graph
18 Commits
Author SHA1 Message Date
John MacFarlane cab682ba58 HTML writer: Include all classes on highlighted code elements.
Previously, only the language class was included, and the
others were dropped.

Closes #11423.
2026-01-27 12:00:31 +01:00
John MacFarlane 1bfab1d11e HTML writer footnotes changes:
When `--reference-location=section` or `=block`, use an
`aside` element for the notes rather than a `section`.

When `--reference-location=section`, include the `aside`
element inside the section element, rather than outside.
(In slide shows, this option causes footnotes on a slide
to be displayed at the bottom of the slide.)

Closes #8695.
2023-03-14 21:49:05 -07:00
Justin Wood 740396d1ed HTML Reader: Tests for 'tt' and 'code' elements (#8330).
tt is a deprecated element in HTML, but is still used in the wild in
some places, support reading it as just another 'code' element.

Commit 4abb9d0ad8 was originally
part of this PR as well.
2022-09-28 14:04:07 -07:00
Albert Krewinkel d6916e2a40 Tests: improve location reporting of failing tests 2022-02-23 09:20:06 +01:00
John MacFarlane c4f6e6cb57 HTML writer: make line breaks more consistent.
- With `--wrap=none`, we now output line breaks between
  block-level elements. Previously they were omitted
  entirely, so the whole document was on one line, unless
  there were literal line breaks in pre sections.  This makes
  the HTML writer's behavior more consistent with that of
  other writers.

- Put newline after `<dd>`.

- Put newlines after block-level elements in footnote section.
2021-12-22 09:45:02 -08:00
Francesco Mazzoli 99a4d1d0b0 Support --reference-location for HTML output (#7461)
The HTML writer now supports `EndOfBlock`, `EndOfSection`, and
`EndOfDocument` for reference locations.  EPUB and HTML slide
show formats are also affected by this change.

This works similarly to the markdown writer, but with special care
taken to skipping section divs with what regards to the block level.

The change also takes care to not modify the output if `EndOfDocument`
is used.
2021-09-10 09:30:05 -07:00
Albert Krewinkel 25f5b92777 HTML writer: ensure headings only have valid attribs in HTML4
Fixes: #5944
2021-05-17 15:42:15 +02:00
Albert Krewinkel d202f7eb77 Avoid unnecessary use of NoImplicitPrelude pragma (#7089) 2021-02-07 10:02:35 -08:00
John MacFarlane 4c3db9273f Apply linter suggestions. Add fix_spacing to lint target in Makefile. 2020-02-07 09:08:22 -08:00
Amogh Rathore bd2bd9b19d HTML Reader/Writer - Add support for <var> and <samp> (#5861)
Closes #5799
2019-11-04 08:42:30 -08:00
Ole Martin Ruud 45479114e8 HTML reader/writer: Better handling of <q> with cite attribute (#5837)
* 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-10-24 22:27:49 -07:00
John MacFarlane b6cf490efd Use latest skylighting. 2019-02-10 08:06:53 -08:00
Alexander Krotov e6ba0cc893 HTML writer: always output <dt> element, even if it is empty
Fixes #4883
2018-09-11 13:20:11 +03:00
John MacFarlane 7e389cb3db Use NoImplicitPrelude and explicitly import Prelude.
This seems to be necessary if we are to use our custom Prelude
with ghci.

Closes #4464.
2018-03-18 10:46:28 -07:00
John MacFarlane fa719d0264 Switched Writer types to use Text.
* XML.toEntities: changed type to Text -> Text.
* Shared.tabFilter -- fixed so it strips out CRs as before.
* Modified writers to take Text.
* Updated tests, benchmarks, trypandoc.

[API change]

Closes #3731.
2017-06-11 00:46:31 +02:00
John MacFarlane 6ecc5b96a9 Use tasty for tests rather than test-framework. 2017-03-14 17:07:23 +01:00
John MacFarlane e256c8ce17 Stylish-haskell automatic formatting changes. 2017-03-04 13:03:41 +01:00
John MacFarlane 18ab864269 Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00