diff --git a/AUTHORS.rst b/AUTHORS.rst index 5b3ac10..acd51a0 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -40,6 +40,7 @@ The AUTHORS/Contributors are (and/or have been): * Edward Ross * Gregory Anders * Alex Vandiver +* Hugohong258 Maintainer: diff --git a/ChangeLog.rst b/ChangeLog.rst index 2d96e3b..fbb7e5c 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -1,3 +1,8 @@ +Unreleased +========== + +* Clarify that IGNORE_ANCHORS maps to HTML2Text.ignore_links in the usage guide. + 2025.4.15 ========= ---- diff --git a/docs/usage.md b/docs/usage.md index 3bef7f8..0e49f64 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -70,7 +70,7 @@ simple indications of their function. - INLINE_LINKS for formatting images and links - PROTECT_LINKS protect from line breaks - GOOGLE_LIST_INDENT no of pixels to indent nested lists - - IGNORE_ANCHORS + - IGNORE_ANCHORS to omit link formatting (set `parser.ignore_links`) - IGNORE_IMAGES - IMAGES_AS_HTML always generate HTML tags for images; preserves `height`, `width`, `alt` if possible. - IMAGES_TO_ALT @@ -110,6 +110,11 @@ To alter any option the procedure is to create a parser with `parser = html2text.HTML2Text()` and to set the option on the parser. example: `parser.unicode_snob = True` to set the UNICODE_SNOB option. +The `IGNORE_ANCHORS` configuration constant is an exception to this naming +convention: set `parser.ignore_links = True`, rather than +`parser.ignore_anchors`, to keep link text without its Markdown link formatting. +This is also the Python equivalent of the `--ignore-links` command line option. + Command line options --------------------