You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.
The <body> tag wrapped around the content when generating a summary (I assume for good reason) also turn up in the content of the post itself, where they don't belong.
This is the change I propose to fix it:
diff --git a/markup.py b/markup.py
index 56aba92..0651f4c 100644
--- a/markup.py
+++ b/markup.py
@@ -117,11 +117,11 @@ class IPythonNB(BaseReader):
parser = MyHTMLParser(self.settings, filename)
if isinstance(content, six.binary_type):
# unicode_literals makes format() try to decode as ASCII. Enforce decoding as UTF-8.
- content = '<body>{0}</body>'.format(content.decode("utf-8"))
+ wrapped_content = '<body>{0}</body>'.format(content.decode("utf-8"))
else:
# Content already decoded
- content = '<body>{0}</body>'.format(content)
- parser.feed(content)
+ wrapped_content = '<body>{0}</body>'.format(content)
+ parser.feed(wrapped_content)
parser.close()
# content = parser.body
metadata['summary'] = parser.summary
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The
<body>
tag wrapped around the content when generating a summary (I assume for good reason) also turn up in the content of the post itself, where they don't belong.This is the change I propose to fix it:
The text was updated successfully, but these errors were encountered: