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 Mar 26, 2021. It is now read-only.
Why does django softhyphen strip whitespace indefinitely? I have a case where the paragraph I'm hyphenating has a style tag <em> around the first word of the paragraph, and that text has a space at the end of the text in the <em> tag, or after the </em> tag which is getting stripped out.
This is an example of what the text looks like with the space inside the <em> tag:
<p><em>Test. </em>This is a test paragraph.</p>
This is an example of what the text looks like with the space after the <em> tag:
<p><em>Test.</em> This is a test paragraph.</p>
The result after hyphenation in either case is:
<p><em>Test.</em>This is a test paragraph.</p>
I can fix this locally by changing STRIP_WHITESPACE.sub(...) to re.sub(...) but it would be nice to be able to choose if I want to strip whitespace or not. Is there a reason the whitespace is always stripped? Can this be default to strip, but I can override it?
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.
Why does django softhyphen strip whitespace indefinitely? I have a case where the paragraph I'm hyphenating has a style tag
<em>
around the first word of the paragraph, and that text has a space at the end of the text in the<em>
tag, or after the</em>
tag which is getting stripped out.This is an example of what the text looks like with the space inside the
<em>
tag:This is an example of what the text looks like with the space after the
<em>
tag:The result after hyphenation in either case is:
I can fix this locally by changing STRIP_WHITESPACE.sub(...) to re.sub(...) but it would be nice to be able to choose if I want to strip whitespace or not. Is there a reason the whitespace is always stripped? Can this be default to strip, but I can override it?
The text was updated successfully, but these errors were encountered: