Skip to content

Commit b8369cc

Browse files
committed
Meta: improve pull request guidelines
Fixes #276.
1 parent 115858e commit b8369cc

File tree

1 file changed

+62
-5
lines changed

1 file changed

+62
-5
lines changed

README.md

Lines changed: 62 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,68 @@ started, leave a comment on the issue or ask around [on IRC](https://wiki.whatwg
1515

1616
### Pull requests
1717

18-
See the [html repository's README](https://github.com/whatwg/html/blob/master/README.md) for the
19-
general guidelines. Note that `source` is `Overview.src.html` and "Acknowledgements" is
20-
"Acknowledgments" here (I know). Also, the Fetch Standard uses
21-
[Anolis](https://wiki.whatwg.org/wiki/Anolis) to generate `Overview.html`. (Do not worry if using
22-
that tool is too complicated, your pull request does not need to contain the generated HTML.)
18+
In short, change `Overview.src.html` and submit your patch, with a
19+
[good commit message](https://github.com/erlang/otp/wiki/Writing-good-commit-messages). Consider
20+
reading through the [WHATWG FAQ](https://wiki.whatwg.org/wiki/FAQ) if you are new here.
21+
22+
Please add your name to the Acknowledgments section in your first pull request, even for trivial
23+
fixes. The names are sorted lexicographically.
24+
25+
To generate `Overview.html`, [Anolis](https://wiki.whatwg.org/wiki/Anolis) can be used. (Do not
26+
worry if using that tool is too complicated, your pull request does not need to contain the
27+
generated HTML to be accepted.)
28+
29+
#### Formatting
30+
31+
Use a column width of 100 characters.
32+
33+
Do not use newlines inside "inline" elements, even if that means exceeding the column width
34+
requirement.
35+
```html
36+
<li><p>Execute
37+
<a href=https://w3c.github.io/webappsec-csp/#set-response-csp-list>set <var>response</var>'s CSP list</a>
38+
on <var>response</var>. <span data-anolis-ref>CSP</span>
39+
```
40+
is okay and
41+
```html
42+
<li><p>Execute
43+
<a href=https://w3c.github.io/webappsec-csp/#set-response-csp-list>set <var>response</var>'s CSP
44+
list</a> on <var>response</var>. <span data-anolis-ref>CSP</span>
45+
```
46+
is not.
47+
48+
Using newlines between "inline" element tag names and their content is also forbidden. (This
49+
actually alters the content, by adding spaces.) That is
50+
```html
51+
<a>token</a>
52+
```
53+
is fine and
54+
```html
55+
<a>token
56+
</a>
57+
```
58+
is not.
59+
60+
An `<li>` element always has a `<p>` element inside it, unless it's a child of `<ul class=brief>`.
61+
62+
If a "block" element contains a single "block" element, do not put it on a newline.
63+
64+
Do not indent for anything except a new "block" element. For instance
65+
```html
66+
<li><p>Set <var>response</var>'s <span title=concept-response-url-list>url list</span> to a copy of
67+
<var>request</var>'s <span title=concept-request-url-list>url list</span>.
68+
```
69+
is not indented, but
70+
```html
71+
<li>
72+
<p>Run these substeps <span data-anolis-spec=html>in parallel</span>:
73+
74+
<ol>
75+
```
76+
is.
77+
78+
End tags must be omitted when possible and attribute values must not be quoted (if necessary, use
79+
double quotes).
2380

2481
### Merge policy
2582

0 commit comments

Comments
 (0)