Always emojify
This commit is contained in:
parent
1806686e63
commit
c4d648e952
|
@ -43,13 +43,9 @@ proc emojify*(node: XmlNode) =
|
||||||
i.add newText(i.getAttr("alt"))
|
i.add newText(i.getAttr("alt"))
|
||||||
|
|
||||||
proc getQuoteText*(tweet: XmlNode): string =
|
proc getQuoteText*(tweet: XmlNode): string =
|
||||||
let
|
let text = tweet.querySelector(".QuoteTweet-text")
|
||||||
text = tweet.querySelector(".QuoteTweet-text")
|
|
||||||
hasEmojis = not text.querySelector(".Emoji").isNil
|
|
||||||
|
|
||||||
if hasEmojis:
|
|
||||||
emojify(text)
|
|
||||||
|
|
||||||
|
emojify(text)
|
||||||
result = stripText(selectText(text, ".tweet-text"))
|
result = stripText(selectText(text, ".tweet-text"))
|
||||||
result = stripTwitterUrls(result)
|
result = stripTwitterUrls(result)
|
||||||
|
|
||||||
|
@ -59,11 +55,8 @@ proc getTweetText*(tweet: XmlNode): string =
|
||||||
link = tweet.selectAttr(selector, "data-expanded-url")
|
link = tweet.selectAttr(selector, "data-expanded-url")
|
||||||
quote = tweet.querySelector(".QuoteTweet")
|
quote = tweet.querySelector(".QuoteTweet")
|
||||||
text = tweet.querySelector(".tweet-text")
|
text = tweet.querySelector(".tweet-text")
|
||||||
hasEmojis = not text.querySelector(".Emoji").isNil
|
|
||||||
|
|
||||||
if hasEmojis:
|
|
||||||
emojify(text)
|
|
||||||
|
|
||||||
|
emojify(text)
|
||||||
result = stripText(selectText(text, ".tweet-text"))
|
result = stripText(selectText(text, ".tweet-text"))
|
||||||
|
|
||||||
if not quote.isNil and link.len > 0:
|
if not quote.isNil and link.len > 0:
|
||||||
|
|
Loading…
Reference in New Issue