Replies: 1 comment
-
|
Good question! We forbid tabs in indentation mainly for determinism and simplicity, not because it was impossible to support them.
That said, the spec does allow decoders in non‑strict mode to accept tabs in indentation with implementation‑defined rules (§12). So a library can choose to be lenient with tab‑indented input, while still emitting spaces for canonical output. Hope that answers all of your questions! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
A general question about why decision was made to use spaces for indentation? Tabs would seem to save tokens, should negate need for configurable number of spaces by allowing differential visual indenting based on user editor preferences, and should avoid indentation copy/paste conflicts between differently configured indentations. Section 12 of SPEC.md:
Did tabs cause an issue with other parts of the encoding? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions