Concise Mode Modifications
Text inside a tag
Current Syntax:
Pros:
Cons:
- Not familiar to newcomers
Proposal 1:
Pros:
- Familiar to newcomers
- It is usually clear when a text node ends with whitespace
Cons:
- Multiline looks kind of gross
- The end of the text node must be marked
`
must be escaped when used in a text node
- It isn't clear what should happen here:
Semicolon as newline/indentation
Current behavior:
Proposal 1:
Proposal 2:
Extra benefit: if
and for
can be used directly instead of with directives, which Luke thinks is more obvious at a glance
Attributes in array
Current Behavior:
Pros:
- No need for commas
- Beginning and end are clearly marked
- If modifications are made to current parsing, this is kind of nice:
Cons:
Proposal 1:
Pros:
- Basically already exists
- Easy to describe
Cons:
- May be harder to read
- Every newline needs a comma
Proposal 2:
Pros:
- Attribute block is clearly defined
Cons:
- Default attribute is controversial
CURRENT FAVORITE:
- Use proposal 1 with commas, but lighten rules
- comma is completely optional unless it is before or after a newline
Text Tag Body Content
For <script>
, <style>
, <textarea>
, <html-comment>
we shouldn't require --
inside the body of concise mode. HOWEVER, it would be a breaking change to treat --
as a part of the text so it is now optional.