Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions readabilipy/simplifiers/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ def wrap_bare_text(soup):
# - we are adding additional structure that was not present in the original document
if element.parent.name in block_level_whitelist() and len(element.parent.contents) == 1:
pass
# title elements should not have their text wrapped in <p> tags
# as they can only contain text content according to HTML spec.
elif element.parent.name == 'title':
pass
# ... otherwise wrap them in <p> tags
else:
p_element = soup.new_tag("p")
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.