Skip to content

Third edition review - #2

Open
gesa wants to merge 3 commits into
tc39:2026-09-whitespace-in-grammarfrom
gesa:third-edition-review
Open

gesa wants to merge 3 commits into
tc39:2026-09-whitespace-in-grammarfrom
gesa:third-edition-review

Conversation

@gesa

@gesa gesa commented Sep 19, 2026

Copy link
Copy Markdown
Member
  • Print styles for optimum pagination
    • Added non-breaking spaces in clause 4 between three inline grammars
  • References edited to align with Ecma style
  • Metadata updated

See html and pdf, compiled from these changes, for thorough review.

* Print styles generated using the content in tc39#1
* References edited to align with Ecma style
* Metadata updated
@gesa

gesa commented Sep 19, 2026

Copy link
Copy Markdown
Member Author

I can't assign reviewers, so I'll just pester you directly @FUDCo @gibson042

Comment thread spec.html
</table>
</emu-table>
<p>Any token may be preceded and/or followed by insignificant whitespace consisting of an arbitrary combination of the following code points: character tabulation (U+0009), line feed (U+000A), carriage return (U+000D), and space (U+0020). Concretely, |JSONText| may begin and/or end with |JSONWhiteSpace|, and there is implicitly an optional |JSONWhiteSpace| in the right-hand side of each JSON grammar production after each non-final structural token terminal symbol and before each non-initial structural token terminal symbol (e.g., <emu-grammar>JSONObject: `{` `}`</emu-grammar> is actually <emu-grammar>JSONObject: `{` JSONWhiteSpace? `}`</emu-grammar> and <emu-grammar>JSONMemberList: JSONMemberList `,` JSONMember</emu-grammar> is actually <emu-grammar>JSONMemberList: JSONMemberList JSONWhiteSpace? `,` JSONWhiteSpace? JSONMember</emu-grammar>).</p>
<p>Any token may be preceded and/or followed by insignificant whitespace consisting of an arbitrary combination of the following code points: character tabulation (U+0009), line feed (U+000A), carriage return (U+000D), and space (U+0020). Concretely, |JSONText| may begin and/or end with |JSONWhiteSpace|, and there is implicitly an optional |JSONWhiteSpace| in the right-hand side of each JSON grammar production after each non-final structural token terminal symbol and before each non-initial structural token terminal symbol (e.g., <emu-grammar>JSONObject: `{` `}`</emu-grammar> is&nbsp;actually <emu-grammar>JSONObject: `{` JSONWhiteSpace? `}`</emu-grammar> and <emu-grammar>JSONMemberList: JSONMemberList `,` JSONMember</emu-grammar> is&nbsp;actually <emu-grammar>JSONMemberList: JSONMemberList JSONWhiteSpace? `,` JSONWhiteSpace? JSONMember</emu-grammar>).</p>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of binding "is actually" into a non-breakable phrase?

Suggested change
<p>Any token may be preceded and/or followed by insignificant whitespace consisting of an arbitrary combination of the following code points: character tabulation (U+0009), line feed (U+000A), carriage return (U+000D), and space (U+0020). Concretely, |JSONText| may begin and/or end with |JSONWhiteSpace|, and there is implicitly an optional |JSONWhiteSpace| in the right-hand side of each JSON grammar production after each non-final structural token terminal symbol and before each non-initial structural token terminal symbol (e.g., <emu-grammar>JSONObject: `{` `}`</emu-grammar> is&nbsp;actually <emu-grammar>JSONObject: `{` JSONWhiteSpace? `}`</emu-grammar> and <emu-grammar>JSONMemberList: JSONMemberList `,` JSONMember</emu-grammar> is&nbsp;actually <emu-grammar>JSONMemberList: JSONMemberList JSONWhiteSpace? `,` JSONWhiteSpace? JSONMember</emu-grammar>).</p>
<p>Any token may be preceded and/or followed by insignificant whitespace consisting of an arbitrary combination of the following code points: character tabulation (U+0009), line feed (U+000A), carriage return (U+000D), and space (U+0020). Concretely, |JSONText| may begin and/or end with |JSONWhiteSpace|, and there is implicitly an optional |JSONWhiteSpace| in the right-hand side of each JSON grammar production after each non-final structural token terminal symbol and before each non-initial structural token terminal symbol (e.g., <emu-grammar>JSONObject: `{` `}`</emu-grammar> is actually <emu-grammar>JSONObject: `{` JSONWhiteSpace? `}`</emu-grammar> and <emu-grammar>JSONMemberList: JSONMemberList `,` JSONMember</emu-grammar> is actually <emu-grammar>JSONMemberList: JSONMemberList JSONWhiteSpace? `,` JSONWhiteSpace? JSONMember</emu-grammar>).</p>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose is that the PDF renderer, due to the length and flow of the inline-blocks surrounding the phrase, inserts a line break there without it, rendering it as

…(e.g., JSONObject : { }
is
actually
JSONObject : { JSONWhiteSpace …

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.

2 participants