Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #26 from boypt/prevlen
Browse files Browse the repository at this point in the history
只发布比PreviewText长的Telegraph
  • Loading branch information
indes authored Dec 24, 2019
2 parents 643d178 + 385b358 commit 584a79b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion model/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ func getContentByFeedItem(source *Source, item *rss.Item) (Content, error) {

html = strings.Replace(html, "<![CDATA[", "", -1)
html = strings.Replace(html, "]]>", "", -1)
if config.EnableTelegraph {

if config.EnableTelegraph && len([]rune(html)) > config.PreviewText {
tgpUrl = PublishItem(source, item, html)
}

Expand Down

0 comments on commit 584a79b

Please sign in to comment.