mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-12 11:06:30 +00:00
Strip trailing newlines from tweets
This commit is contained in:
parent
cdf49dcddd
commit
6f348f2f2e
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
import strutils, times, macros, htmlgen, unicode, options, algorithm
|
import std/[strutils, times, macros, htmlgen, options, algorithm, re]
|
||||||
import std/re
|
import std/unicode except strip
|
||||||
import packedjson
|
import packedjson
|
||||||
import types, utils, formatters
|
import types, utils, formatters
|
||||||
|
|
||||||
|
@ -275,3 +275,4 @@ proc expandTweetEntities*(tweet: Tweet; js: JsonNode) =
|
||||||
replacements.sort(cmp)
|
replacements.sort(cmp)
|
||||||
|
|
||||||
tweet.text = orig.replacedWith(replacements, textSlice)
|
tweet.text = orig.replacedWith(replacements, textSlice)
|
||||||
|
.strip(leading=false)
|
||||||
|
|
Loading…
Reference in a new issue