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 21, 2023. It is now read-only.
..is normally ignored by the browser outside of tags like <pre> and <textarea>, one can use CSS properties such as "white-space: pre" to make the browser preserve whitespace within a portion of the document..
It would be nice if collapse_whitespace would also ignore <code> tags, as these are quite a common case for "white-space: pre".
Additionally, MDN says:
The HTML <code> element displays its contents styled in a fashion intended to indicate that the text is a short fragment of computer code.
Based on that description, it's plausible that a browser may choose to pay attention to whitespace, where it normally wouldn't (given that, for example, Python code without the whitespace would be invalid code).
So, skipping <code> content would make this filter a fair bit safer to use.
The text was updated successfully, but these errors were encountered:
The documentation says:
It would be nice if collapse_whitespace would also ignore <code> tags, as these are quite a common case for "white-space: pre".
Additionally, MDN says:
Based on that description, it's plausible that a browser may choose to pay attention to whitespace, where it normally wouldn't (given that, for example, Python code without the whitespace would be invalid code).
So, skipping <code> content would make this filter a fair bit safer to use.
The text was updated successfully, but these errors were encountered: