Discover Packages
github.com/Teamwork/htmltotext
package
module
Version:
v0.0.0-...-6a8de9c
Opens a new window with list of versions in this module.
Published: Jan 9, 2020
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README Documentation Source Files Overview Index Constants Variables Functions Types ToDocument(html) ToLine(html) ToText(html)
Documentation
¶
Package htmltotext converts HTML to plain text.
ToDocument removes HTML tags from a document and attempts to format it so
it's relatively readable.
ToLine behaves line ToText, but also collapses all newlines to a single
space, so the resulting text is always a single line.
ToText removes HTML tags. In general you only want to use this for short
strings (e.g. a line or less). use ToDocument() for longer text with
paragraphs.
For example:
<b>¡Hi!</b> <script>...</script>
becomes:
¡Hi!
Source Files
¶
Click to show internal directories.
Click to hide internal directories.