diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-05-10 23:07:24 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-05-10 23:07:24 +0200 |
commit | abe91b14f1742abdfd8f0dc80a38dd8840c5de79 (patch) | |
tree | 41696ab580377bafaa4e557d3b0490aa2769d53b | |
parent | 5e5d848b1324cc5ea3991276f2a0750883e5aab0 (diff) | |
download | feed2imap-go-abe91b14f1742abdfd8f0dc80a38dd8840c5de79.tar.gz feed2imap-go-abe91b14f1742abdfd8f0dc80a38dd8840c5de79.tar.bz2 feed2imap-go-abe91b14f1742abdfd8f0dc80a38dd8840c5de79.zip |
Switch to our own html2text fork for the time being
-rw-r--r-- | go.mod | 2 | ||||
-rw-r--r-- | go.sum | 4 | ||||
-rw-r--r-- | internal/feed/mail.go | 4 |
3 files changed, 5 insertions, 5 deletions
@@ -3,6 +3,7 @@ module github.com/Necoro/feed2imap-go go 1.14 require ( + github.com/Necoro/html2text v0.0.0-20200510154123-c8759788e76c github.com/PuerkitoBio/goquery v1.5.1 github.com/emersion/go-imap v1.0.4 github.com/emersion/go-imap-uidplus v0.0.0-20200503180755-e75854c361e9 @@ -10,7 +11,6 @@ require ( github.com/gabriel-vasile/mimetype v1.1.0 github.com/google/go-cmp v0.4.0 github.com/google/uuid v1.1.1 - github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7 github.com/mmcdole/gofeed v1.0.0-beta2.0.20200331235650-4298e4366be3 github.com/olekukonko/tablewriter v0.0.4 // indirect github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect @@ -1,3 +1,5 @@ +github.com/Necoro/html2text v0.0.0-20200510154123-c8759788e76c h1:AXxZamrf3VrhWgYBPrT4dAP0lWVLYNnOyFgML8r/J6k= +github.com/Necoro/html2text v0.0.0-20200510154123-c8759788e76c/go.mod h1:D5SSrHqldK3oe5lx1uMRgJzbpykn5I/9C/sctGqCDHU= github.com/PuerkitoBio/goquery v1.5.0 h1:uGvmFXOA73IKluu/F84Xd1tt/z07GYm8X49XKHP7EJk= github.com/PuerkitoBio/goquery v1.5.0/go.mod h1:qD2PgZ9lccMbQlc7eEOjaeRlFQON7xY8kdmcsrnKqMg= github.com/PuerkitoBio/goquery v1.5.1 h1:PSPBGne8NIUWw+/7vFBV+kG2J/5MOjbzc7154OaKCSE= @@ -27,8 +29,6 @@ github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7 h1:g0fAGBisHaEQ0TRq1iBvemFRf+8AEWEmBESSiWB3Vsc= -github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk= github.com/martinlindhe/base36 v1.0.0 h1:eYsumTah144C0A8P1T/AVSUk5ZoLnhfYFM3OGQxB52A= github.com/martinlindhe/base36 v1.0.0/go.mod h1:+AtEs8xrBpCeYgSLoY/aJ6Wf37jtBuR0s35750M27+8= github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= diff --git a/internal/feed/mail.go b/internal/feed/mail.go index 4cdc57a..c03a27b 100644 --- a/internal/feed/mail.go +++ b/internal/feed/mail.go @@ -11,11 +11,11 @@ import ( "strings" "time" + "github.com/Necoro/html2text" "github.com/PuerkitoBio/goquery" "github.com/emersion/go-message" "github.com/emersion/go-message/mail" "github.com/gabriel-vasile/mimetype" - "github.com/jaytaylor/html2text" "golang.org/x/net/html" "github.com/Necoro/feed2imap-go/internal/feed/template" @@ -266,7 +266,7 @@ func (item *item) buildBody() { } if feed.Global.WithPartText() { - if item.TextBody, err = html2text.FromHTMLNode(bodyNode); err != nil { + if item.TextBody, err = html2text.FromHTMLNode(bodyNode, html2text.Options{CitationStyleLinks: true}); err != nil { log.Errorf("Feed %s: Item %s: Error while converting html to text: %s", feed.Name, item.Link, err) } } |