Skip to content

v1.4.2

Choose a tag to compare

@hownowstephen hownowstephen released this 22 Oct 15:49
7a3b24c

What's Changed

Faster conversion with less memory, deeply nested spans no longer multiply allocations, and   spacers no longer leave blank-looking lines.

Performance

  • fixSpacing reads ASCII bytes directly, output buffers are pooled, and layout tables are rejected before their subtrees are walked. Convert is about 8% faster and allocates about 10% fewer bytes (#118)

Fixes

  • Nested spans are converted in place rather than copied out at every level, so 1 MB of text inside 200 nested spans allocates 6.8 MB instead of 391 MB (#120)
  • A no-break space at the start or end of a line, or in a run of spaces, counts as spacing, so <p>&nbsp;</p> and <td>&nbsp;</td> spacers stop leaving lines that look blank. A single no-break space between two words is kept (#121)

Dependencies

  • golang.org/x/net 0.61.0 (#113)

Full Changelog: v1.4.1...v1.4.2