Skip to content

Conversation

@jsm28
Copy link
Contributor

@jsm28 jsm28 commented Feb 5, 2025

Nonbreaking spaces should be preserved in places such as the start of a paragraph or blockquote, so change various places to strip only ASCII ' \t\r\n'. There may be other places that should also avoid stripping nonbreaking spaces (or, conversely, where trailing such spaces could safely be stripped even if they no longer are after this change), but this seems a reasonable starting point to fix issues in this area.

jsm28 and others added 2 commits February 5, 2025 22:15
Nonbreaking spaces should be preserved in places such as the start of
a paragraph or blockquote, so change various places to strip only
ASCII `' \t\r\n'`.  There may be other places that should also avoid
stripping nonbreaking spaces (or, conversely, where *trailing* such
spaces could safely be stripped even if they no longer are after this
change), but this seems a reasonable starting point to fix issues in
this area.
@chrispy-snps
Copy link
Collaborator

@AlexVonB - I think this is a good change, as browsers do not collapse non-breaking spaces either. Are you also agreeable to merging it?

@chrispy-snps chrispy-snps merged commit 3311f4d into matthewwithanm:develop Feb 19, 2025
1 check passed
Wuhall pushed a commit to Wuhall/python-markdownify that referenced this pull request May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants