mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
open graph: Omit .code-section navigation from open graph.
This commit is contained in:
@@ -460,6 +460,10 @@ class FinalizeOpenGraphDescription(MiddlewareMixin):
|
||||
for tag in bs.find_all('div', class_="admonition"):
|
||||
tag.clear()
|
||||
|
||||
# Skip code-sections, which just contains navigation instructions.
|
||||
for tag in bs.find_all('div', class_="code-section"):
|
||||
tag.clear()
|
||||
|
||||
text = ''
|
||||
for paragraph in bs.find_all('p'):
|
||||
# .text converts it from HTML to text
|
||||
|
||||
Reference in New Issue
Block a user