Skip to content

Fix (keepspaces): Keep non-breaking spaces between words as spaces - #191

Open
klangme1ster wants to merge 1 commit into
theohbrothers:masterfrom
klangme1ster:fix/keepspaces-keep-non-breaking-spaces-between-words-as-spaces
Open

klangme1ster wants to merge 1 commit into
theohbrothers:masterfrom
klangme1ster:fix/keepspaces-keep-non-breaking-spaces-between-words-as-spaces

Conversation

@klangme1ster

Copy link
Copy Markdown

With keepspaces = 1, every non-breaking space was removed. Web-clipped content often has a non-breaking space as the only space between two words (e.g. 'press theWindowskey'), so words were glued together ('Windowskey').

Now non-breaking spaces are removed only at the start (keeping the line's indentation) and end of a line (incl. lines that only contain them), where converting them could create an indented code block or a trailing-double-space hard line break. Any other run of them becomes a single space.

With keepspaces = 1, every non-breaking space was removed. Web-clipped content often has a non-breaking space as the only space between two words (e.g. 'press the<nbsp>Windows<nbsp>key'), so words were glued together ('Windowskey').

Now non-breaking spaces are removed only at the start (keeping the line's indentation) and end of a line (incl. lines that only contain them), where converting them could create an indented code block or a trailing-double-space hard line break. Any other run of them becomes a single space.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant