Commit c642f23
authored
Docs: Note multi-attribute wrap behavior on
The formatter wraps tags one-attribute-per-line under two conditions
(see
[`attribute-renderer.ts#L91`](https://github.com/marcoroth/herb/blob/b64d55b73e5fadc88e1716ea4e61b47ce6b2d6e7/javascript/packages/formatter/src/attribute-renderer.ts#L91)):
1. The opening tag would exceed `maxLineLength`, OR
2. The tag has more than 3 attributes
Only the first is documented today. The second can be surprising in
practice — `<div a="1" b="2" c="3" d="4">` wraps even though it's 36
characters wide, well under the 80-char default. This PR adds a short
note on the `maxLineLength` option flagging the count rule.
The docs site (`docs/docs/projects/formatter.md`) `@include`s this
README, so herb-tools.dev picks the change up automatically.maxLineLength (#1823)1 parent 4ac7fc8 commit c642f23
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
0 commit comments