You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+6-27Lines changed: 6 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,28 +53,9 @@ Due to the long legacy of the existing text, these guidelines are not always app
53
53
54
54
#### Line wrapping length
55
55
56
-
Use a column width of 100 characters and add newlines where whitespace is used. (Emacs, set `fill-column` to `100`; in Vim, set `textwidth` to `100`; and in Sublime, set `wrap_width` to `100`. Alternatively, wrap the paragraph(s) with your changes with https://domenic.github.io/rewrapper/. Make sure that `column length to rewrap` is set to 100.)
56
+
Do not wrap text within a paragraph (or list item, etc.). Custom wrapping for readability (e.g. one `code` element per line) is OK; add a `data-noreformat` attribute on the containing element.
57
57
58
-
#### Wrapping opportunities
59
-
60
-
Using newlines between "inline" element tag names and their content is forbidden. (This actually alters the content, by adding spaces.) That is,
61
-
```html
62
-
<dd><span>Parse error</span>. Create a new DOCTYPE token. Set its <idata-x="force-quirks
63
-
flag">force-quirks flag</i> to …
64
-
```
65
-
is fine and
66
-
```html
67
-
<dd><span>Parse error</span>. Create a new DOCTYPE token. Set its <idata-x="force-quirks flag">
68
-
force-quirks flag</i> to …
69
-
```
70
-
is not.
71
-
72
-
Using newlines between attributes and inside attribute values that contain whitespace is allowed. Always wrap after putting the maximum number of characters on a single line within these guidelines.
73
-
74
-
```html
75
-
<p>A <code>base</code> element that is the first <code>base</code> element with an <code
76
-
data-x="attr-base-href">href</code> content attribute <span>in a document tree</span> has a
77
-
```
58
+
You can run https://github.com/zcorpan/reformahtml locally to remove inter-paragraph line wrapping. This script is also run as a GitHub workflow.
78
59
79
60
### Element hierarchy
80
61
@@ -92,22 +73,20 @@ and the previous list item. No extra newline at the start or end of the list tho
92
73
93
74
If a "block" element contains a single "block" element, do not put it on a new line.
94
75
95
-
Do not indent for anything except a new "block" element. For instance
76
+
For instance
96
77
```html
97
-
<li><p>Let <var>corsAttributeState</var> be the current state of the element's <code
<li><p>Let <var>corsAttributeState</var> be the current state of the element's <codedata-x="attr-link-crossorigin">crossorigin</code> content attribute.</p></li>
99
79
```
100
80
is not indented, but
101
81
```html
102
82
<li>
103
-
<p>For each <var>element</var> in <var>candidate elements</var>, run the following
104
-
substeps:</p>
83
+
<p>For each <var>element</var> in <var>candidate elements</var>, run the following substeps:</p>
105
84
106
85
<ol>
107
86
```
108
87
is.
109
88
110
-
End tags must not be omitted (except where it is consistent to do so) and attribute values must be quoted (use double quotes).
89
+
End tags must not be omitted (except where it is consistent to do so) and non-empty attribute values must be quoted (use double quotes).
0 commit comments