Skip to content

Commit

Permalink
Update tests and examples for updates
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 17, 2018
1 parent b4c02a5 commit e13ef9d
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 20 deletions.
4 changes: 2 additions & 2 deletions doc/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ npm install --global rehype-cli rehype-preset-minify
`index.html` contains:

```md
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
Expand All @@ -59,7 +59,7 @@ npm install --global rehype-cli rehype-preset-minify
`rehype index.html --use preset-minify` yields:

```txt
<!DOCTYPE html><meta charset=utf8><title>Hello</title><p>World!
<!doctype html><meta charset=utf8><title>Hello</title><p>World!
index.html: no issues found
```

Expand Down
5 changes: 1 addition & 4 deletions packages/rehype-parse/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ var rehype2remark = require('rehype-remark')
var stringify = require('remark-stringify')

unified()
.use(parse, {
emitParseErrors: true,
duplicateAttribute: false
})
.use(parse, {emitParseErrors: true, duplicateAttribute: false})
.use(rehype2remark)
.use(stringify)
.process(vfile.readSync('example.html'), function(err, file) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/doctype-almost-standards/result.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"><html><head></head><body></body></html>
<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN"><html><head></head><body></body></html>
2 changes: 1 addition & 1 deletion test/fixtures/doctype-legacy-double/result.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html SYSTEM "about:legacy-compat"><html><head></head><body></body></html>
<!doctype html system "about:legacy-compat"><html><head></head><body></body></html>
2 changes: 1 addition & 1 deletion test/fixtures/doctype-legacy-single/result.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html SYSTEM "about:legacy-compat"><html><head></head><body></body></html>
<!doctype html system "about:legacy-compat"><html><head></head><body></body></html>
2 changes: 1 addition & 1 deletion test/fixtures/doctype-nameless/result.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE><html><head></head><body></body></html>
<!doctype><html><head></head><body></body></html>
2 changes: 1 addition & 1 deletion test/fixtures/doctype-quirksmode-ibm/result.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html SYSTEM "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"><html><head></head><body></body></html>
<!doctype html system "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"><html><head></head><body></body></html>
2 changes: 1 addition & 1 deletion test/fixtures/doctype-quotes-double/result.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html PUBLIC '-//Alpha "bravo" charlie//DTD HTML Extended 1.0//EN'><html><head></head><body></body></html>
<!doctype html public '-//Alpha "bravo" charlie//DTD HTML Extended 1.0//EN'><html><head></head><body></body></html>
2 changes: 1 addition & 1 deletion test/fixtures/doctype-quotes-single/result.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html PUBLIC "-//Alpha 'bravo' charlie//DTD HTML Extended 1.0//EN"><html><head></head><body></body></html>
<!doctype html public "-//Alpha 'bravo' charlie//DTD HTML Extended 1.0//EN"><html><head></head><body></body></html>
2 changes: 1 addition & 1 deletion test/fixtures/doctype/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html>
<!doctype html>
2 changes: 1 addition & 1 deletion test/fixtures/doctype/result.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head></head><body></body></html>
<!doctype html><html><head></head><body></body></html>
6 changes: 3 additions & 3 deletions test/fixtures/element-attributes/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
"type": "element",
"tagName": "a",
"properties": {
"ngInit": ""
"ng-init": ""
},
"children": [],
"position": {
Expand Down Expand Up @@ -213,7 +213,7 @@
"type": "element",
"tagName": "a",
"properties": {
"ngRepeat": ""
"ng-repeat": ""
},
"children": [],
"position": {
Expand Down Expand Up @@ -249,7 +249,7 @@
"type": "element",
"tagName": "a",
"properties": {
"ngClick": "ctrl.onintentclick($scope)"
"ng-click": "ctrl.onintentclick($scope)"
},
"children": [
{
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/noscript/result.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html><html><head></head><body><h1>noscript!</h1>
<!doctype html><html><head></head><body><h1>noscript!</h1>
<noscript><p>JavaScript isn’t enabled 😢</p></noscript>
<script>alert('JavaScript isn’t enabled 😢')</script>
</body></html>
2 changes: 1 addition & 1 deletion test/fixtures/quirksmode-off/result.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html><html><head><title>Not-Quirksmode</title>
<!doctype html><html><head><title>Not-Quirksmode</title>
</head><body><p>Outside of quirksmode, the following table is outside this paragraph:
</p>!<table></table>
</body></html>

0 comments on commit e13ef9d

Please sign in to comment.