Description
I am requesting a markoClosingBracketNewLine: boolean option which will effect where a closing bracket appears in relation to the opening bracket of a start tag, its attributes, and the child elements. Currently in Marko ^6.0.0
<my-tag
attr1="attr"
attr2="attr"
attr3="attr"
attr4="attr"
attr5="attr">
TEXT
</my-tag>
Would prefer:
<my-tag
attr1="attr"
attr2="attr"
attr3="attr"
attr4="attr"
attr5="attr"
>
TEXT
</my-tag>
Why
It creates a visual distinction between the opening of the start tag, the attributes, its content, and the closing of the start tag. Currently, the child (eg: TEXT) is in line with the attributes without any tabs, spacing, breaks, etc to separate it. That makes it look like an attribute, and is visually unclear.
What happens if I want to comment out the last attribute? Using VS Code to just CMD+/ a line, it would result in
<my-tag
attr1="attr"
attr2="attr"
attr3="attr"
attr4="attr"
// attr5="attr">
TEXT
</my-tag>
which now removes the closing bracket and breaks the code entirely. Extra effort is needed to correct this.
How can it benefit other users?
- Visual clarity
- Fewer manual actions to comment out attributes and move closing bracket
- Parity with other libraries and formatters
Is this something you're interested in working on?
No
Description
I am requesting a
markoClosingBracketNewLine: booleanoption which will effect where a closing bracket appears in relation to the opening bracket of a start tag, its attributes, and the child elements. Currently in Marko^6.0.0Would prefer:
Why
It creates a visual distinction between the opening of the start tag, the attributes, its content, and the closing of the start tag. Currently, the child (eg:
TEXT) is in line with the attributes without any tabs, spacing, breaks, etc to separate it. That makes it look like an attribute, and is visually unclear.What happens if I want to comment out the last attribute? Using VS Code to just CMD+/ a line, it would result in
which now removes the closing bracket and breaks the code entirely. Extra effort is needed to correct this.
How can it benefit other users?
Is this something you're interested in working on?
No