Alir3z4 / Alir3z4/html2text

Strip leading/trailing whitespace for links and inline code

Open
#376 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
2.2k
Forks
296
PR merge metrics
No merged PRs in 30d

Description

It would be great if the fix from #177 for #142, which strips leading and trailing whitespace for emphasis/strong/underline/strikethrough, could also be applied to links and inline code where [leading and trailing space is stripped for `white-space: normal`](https://www.w3.org/TR/css-text-3/#white-space-rules).

html2text.html2text('\nExample\n')
'[ Example ](https://example.com)\n\n'
>>> html2text.html2text('\nx = 1\n')
'` x = 1 `\n\n'

- Version by `html2text --version`: 2020.1.16 (a3ed67b)
- Test script: See above.
- Python version `python --version`: 3.9.10

Related: #371

Thanks,
Kevin

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.