Skip to content

Releases: k3a/html2text

Improved <a> tag handling & optional <li> list formatting

10 May 20:36
@k3a k3a
Compare
Choose a tag to compare

Changes:

  • another fully-backward-compatible update
  • tag is now case-insensitive and follows official specs, see #16
  • added optional WithListSupport and WithListSupportPrefix to make <li></li> lines formatted with a prefix like " - "

v1.1.0

07 Nov 17:22
@k3a k3a
Compare
Choose a tag to compare
  • same as v1.0.9, just signaling the fact that the new functionality has been added
  • fully-backward-compatible update (with any past version)
  • functional options (line breaks style and tag inner text preservation)
    HTML2TextWithOptions(`click <a href="http://bit.ly/2n4wXRs">news</a>`, WithLinksInnerText())
    // produces: click news <http://bit.ly/2n4wXRs>

v1.0.9

07 Nov 13:13
@k3a k3a
Compare
Choose a tag to compare
  • fully-backward-compatible update
  • functional options (line breaks style and tag inner text preservation)
    HTML2TextWithOptions(`click <a href="http://bit.ly/2n4wXRs">news</a>`, WithLinksInnerText())
    // produces: click news <http://bit.ly/2n4wXRs>

v1.0.7

19 Nov 15:07
@k3a k3a
Compare
Choose a tag to compare

Fix tag pattern to support custom tags starting with 'a' character like <attribute>test</attribute> and return inner content test.

v1.0.6

01 Nov 21:28
@k3a k3a
Compare
Choose a tag to compare
fix: allow # in link URLs and prevent unnecessary space, fixes #11

1.0.5

03 Oct 11:19
@k3a k3a
Compare
Choose a tag to compare

Fix to prevent lower-casing "href" attribute of tags

1.0.4

14 Jul 17:39
@k3a k3a
9556150
Compare
Choose a tag to compare

Configurable line break style (backward-compatible CrLf is default) and numerical html entities, both contributed by @merlincox.