hygiene: permit additional unambiguous box-drawing characters#165665
Closed
rwe wants to merge 4 commits intomicrosoft:mainfrom
Closed
hygiene: permit additional unambiguous box-drawing characters#165665rwe wants to merge 4 commits intomicrosoft:mainfrom
rwe wants to merge 4 commits intomicrosoft:mainfrom
Conversation
This does not alter the included ranges.
No functional change: just to clarify subsequent expansion.
This updates the "allowed" set ot include any of the box-drawing
characters, instead of a random assortment.
None of the characters in this range are similar to ASCII letters, with
the (perhaps)-arguable but exception of "╳".
> const [rangeMin, rangeMax] = [0x2500, 0x25FF];
> console.log(Array(rangeMax - rangeMin + 1).fill(rangeMin)
.map((c, i) => String.fromCharCode(c + i))
.join(' ').replaceAll(/(.{32})/g, '$1\n'));
─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ┌ ┍ ┎ ┏
┐ ┑ ┒ ┓ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ┝ ┞ ┟
┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯
┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻ ┼ ┽ ┾ ┿
╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋ ╌ ╍ ╎ ╏
═ ║ ╒ ╓ ╔ ╕ ╖ ╗ ╘ ╙ ╚ ╛ ╜ ╝ ╞ ╟
╠ ╡ ╢ ╣ ╤ ╥ ╦ ╧ ╨ ╩ ╪ ╫ ╬ ╭ ╮ ╯
╰ ╱ ╲ ╳ ╴ ╵ ╶ ╷ ╸ ╹ ╺ ╻ ╼ ╽ ╾ ╿
▀ ▁ ▂ ▃ ▄ ▅ ▆ ▇ █ ▉ ▊ ▋ ▌ ▍ ▎ ▏
▐ ░ ▒ ▓ ▔ ▕ ▖ ▗ ▘ ▙ ▚ ▛ ▜ ▝ ▞ ▟
■ □ ▢ ▣ ▤ ▥ ▦ ▧ ▨ ▩ ▪ ▫ ▬ ▭ ▮ ▯
▰ ▱ ▲ △ ▴ ▵ ▶ ▷ ▸ ▹ ► ▻ ▼ ▽ ▾ ▿
◀ ◁ ◂ ◃ ◄ ◅ ◆ ◇ ◈ ◉ ◊ ○ ◌ ◍ ◎ ●
◐ ◑ ◒ ◓ ◔ ◕ ◖ ◗ ◘ ◙ ◚ ◛ ◜ ◝ ◞ ◟
◠ ◡ ◢ ◣ ◤ ◥ ◦ ◧ ◨ ◩ ◪ ◫ ◬ ◭ ◮ ◯
◰ ◱ ◲ ◳ ◴ ◵ ◶ ◷ ◸ ◹ ◺ ◻ ◼ ◽ ◾ ◿
738c7d0 to
11e03df
Compare
Contributor
|
@alexdima is there any concern with allowing box drawing, block element and geometric shape unicode characters? |
Member
|
I am sorry for this inconvenience, but for security reasons we cannot accept this proposed relaxation in allowed characters in our source code. We understand that this is very annoying, as we cannot do diagrams in comments, but we receive daily tens of PRs from anonymous contributors and we cannot risk not being able to trust our eyes when doing PR review. Here's an example of what would go bad given we would accept this PR: This website can provide additional context: https://trojansource.codes/ |
Contributor
Author
|
Fair enough! I've updated those PRs to include ASCII-only diagrams. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates
hygiene.jsto permit additional box-drawing characters, beyond the very small set currently allowed (●◆▼┌└├).The additional characters are shown below and are not confusable with ASCII letters (perhaps arguably
╳, though it's very distinguishable in fonts I've seen), but are useful for diagramming.The impetus to this was the unexpected lint failures of a couple of my PRs which included comment diagrams:
This additionally adds the double-stroke arrows (
⇐,⇔,⇒) in a separate commit.