Skip to content

Commit

Permalink
Update ruleset-style.md ruleset-testing.md (EFForg#7648)
Browse files Browse the repository at this point in the history
* Update ruleset-style.md

* Update ruleset-testing.md

* Update ruleset-style.md

* Update ruleset-testing.md
  • Loading branch information
gloomy-ghost authored and jeremyn committed Feb 10, 2017
1 parent 8c43dfe commit 51b0f13
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
11 changes: 5 additions & 6 deletions ruleset-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ Here is an example ruleset pre-style guidelines:

```xml
<ruleset name="WHATWG.org">
<target host='whatwg.org' />
<target host="*.whatwg.org" />
<target host='whatwg.org' />
<target host="*.whatwg.org" />

<rule from="^http://((?:developers|html-differences|images|resources|\w+\.spec|wiki|www)\.)?whatwg\.org/"
to="https://$1whatwg.org/" />
<rule from="^http://((developers|html-differences|images|resources|\w+\.spec|wiki|www)\.)?whatwg\.org/"
to="https://$1whatwg.org/" />
</ruleset>
```

Expand All @@ -119,7 +119,6 @@ test URLs:
<test url="http://xhr.spec.whatwg.org/" />
<test url="http://dom.spec.whatwg.org/" />

<rule from="^http:"
to="https:" />
<rule from="^http:" to="https:" />
</ruleset>
```
24 changes: 12 additions & 12 deletions ruleset-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ target host with a left-side wildcard, and at least ten test URLs for each
target host with a right-side wildcard. But this is not yet implemented.

# Example:
<ruleset name="example.com">
<target host="example.com" />
<target host="*.example.com" />

<test url="http://www.example.com/" />
<test url="http://beta.example.com/" />

<rule from="^http://([\w-]+\.)?example\.com/"
to="https://$1example.com/" />

</ruleset>

```xml
<ruleset name="example.com">
<target host="example.com" />
<target host="*.example.com" />

<test url="http://www.example.com/" />
<test url="http://beta.example.com/" />

<rule from="^http://([\w-]+\.)?example\.com/"
to="https://$1example.com/" />
</ruleset>
```
This ruleset has one implicit test URL from a target host
("http://example.com/"). The other target host has a wildcard, so creates no
implicit test URL. There's a single rule. That rule contains a '+' and a '?', so
Expand Down

0 comments on commit 51b0f13

Please sign in to comment.