Skip to content

Conversation

@TheV360
Copy link
Contributor

@TheV360 TheV360 commented Sep 4, 2024

No description provided.

@y-ack
Copy link
Contributor

y-ack commented Sep 4, 2024

[^\n\S] is not an appropriate whitespace expression for indentation, it matches:
[\f\r\t\v\u0020\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]

  • \f FORM FEED ❌
  • \r CARRIAGE RETURN ❌
  • \t TAB
  • \v VERTICAL TAB ❌
  • \u0020 SPACE
  • \u00a0 NO-BREAK SPACE
  • \u1680 OGHAM SPACE MARK
  • \u2000-\u200a GENERAL PUNCTUATION BLOCK spaces
  • \u2028 LINE SEPARATOR ❌
  • \u2029 PARAGRAPH SEPARATOR ❌
  • \u202f NARROW NO-BREAK SPACE
  • \u205f MEDIUM MATHEMATICAL SPACE
  • \u3000 IDEOGRAPHIC SPACE
  • \ufeff ZERO WIDTH NO-BREAK SPACE ❌

the problematic characters we have annotated are mostly vertical whitespace characters except for ZWNBSP which is a formatting character marked whitespace due to legacy as BYTE ORDER MARK.

instead of `[^\S\n]`, which includes many vertical
whitespace characters, use the given horizontal
whitespace regex. thanks y!
@TheV360
Copy link
Contributor Author

TheV360 commented Oct 20, 2024

you should merge this..! (or if you could do it better, merge that)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants