mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
markdown: Remove paragraphs that only contain a tweet link.
This is similar to our behavior with image previews, and helps reduce clutter in the final rendered html. We add the string 'Tweet: ' to our existing tests so those tests remain the same.
This commit is contained in:
committed by
Tim Abbott
parent
87e01cd1fa
commit
d3770153a6
@@ -1070,6 +1070,8 @@ class InlineInterestingLinkProcessor(markdown.treeprocessors.Treeprocessor):
|
||||
|
||||
div.set("class", "inline-preview-twitter")
|
||||
div.insert(0, twitter_data)
|
||||
if info['remove'] is not None:
|
||||
info['parent'].remove(info['remove'])
|
||||
|
||||
def find_proper_insertion_index(self, grandparent: Element, parent: Element,
|
||||
parent_index_in_grandparent: int) -> int:
|
||||
|
||||
Reference in New Issue
Block a user