From 23e363040b1bccad257e7cea36187824eabb4810 Mon Sep 17 00:00:00 2001 From: Mario Hros Date: Wed, 10 May 2023 22:31:33 +0200 Subject: [PATCH] add optional list support with custom prefix --- html2text.go | 17 +++++++++++------ html2text_test.go | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/html2text.go b/html2text.go index 991109b..f79fbe3 100644 --- a/html2text.go +++ b/html2text.go @@ -24,7 +24,7 @@ var numericEntityRE = regexp.MustCompile(`(?i)^#(x?[a-f0-9]+)$`) type options struct { lbr string linksInnerText bool - listSupport bool + listPrefix string } func newOptions() *options { @@ -52,13 +52,18 @@ func WithLinksInnerText() Option { } } -// WithListSupport formats