Skip to content

Commit

Permalink
preset-minify: remove space in doctype
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Nov 17, 2018
1 parent e8cacd3 commit 2a0b565
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/rehype-preset-minify/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ exports.settings = {
tightSelfClosing: true,
tightCommaSeparatedLists: true,
tightAttributes: true,
tightDoctype: true,
allowParseErrors: true,
allowDangerousCharacters: true
}
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/aria/output.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang=en><meta charset=utf8><title>ARIA</title><form><style>fieldset>div{position:relative}[role=tooltip]{display:none;padding:.25em;background-color:#000;color:#fff;z-index:1}input:focus+[role=tooltip]{display:block;position:absolute}</style><fieldset><legend>Login</legend><div><label for=username>Username</label> <input aria-describedby=username-tip id=username required><div id=username-tip role=tooltip>Your username is your email address</div></div><div><label for=password>Password</label> <input aria-describedby=password-tip id=password required><div id=password-tip role=tooltip>Was emailed to you when you signed up</div></div></fieldset></form>
<!doctypehtml><html lang=en><meta charset=utf8><title>ARIA</title><form><style>fieldset>div{position:relative}[role=tooltip]{display:none;padding:.25em;background-color:#000;color:#fff;z-index:1}input:focus+[role=tooltip]{display:block;position:absolute}</style><fieldset><legend>Login</legend><div><label for=username>Username</label> <input aria-describedby=username-tip id=username required><div id=username-tip role=tooltip>Your username is your email address</div></div><div><label for=password>Password</label> <input aria-describedby=password-tip id=password required><div id=password-tip role=tooltip>Was emailed to you when you signed up</div></div></fieldset></form>
2 changes: 1 addition & 1 deletion test/fixtures/html-in-svg-in-html/output.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang=en><meta charset=utf8><title>SVG</title><h1>HTML in SVG in HTML</h1><svg height="300" viewBox="0 0 400 300" width="400" xmlns="http://www.w3.org/2000/svg"><desc>This example uses the `&lt;switch>` element to provide a fallback graphical representation of a paragraph, if HTML is not supported. The element will process the first child whose testing attributes evaluate to true. `[requiredExtensions]` is such a test to check if the user agent supports an extensions. The first child without tests is the default.</desc><switch><foreignObject height="100" requiredExtensions="http://www.w3.org/1999/xhtml" width="200"><p xmlns="http://www.w3.org/1999/xhtml">Here is an HTML paragraph that requires word wrap</p></foreignObject><text font-size="16"><tspan x="0" y="14">Here is an SVG paragraph</tspan><tspan x="0" y="32">that requires word wrap.</tspan></text></switch></svg>
<!doctypehtml><html lang=en><meta charset=utf8><title>SVG</title><h1>HTML in SVG in HTML</h1><svg height="300" viewBox="0 0 400 300" width="400" xmlns="http://www.w3.org/2000/svg"><desc>This example uses the `&lt;switch>` element to provide a fallback graphical representation of a paragraph, if HTML is not supported. The element will process the first child whose testing attributes evaluate to true. `[requiredExtensions]` is such a test to check if the user agent supports an extensions. The first child without tests is the default.</desc><switch><foreignObject height="100" requiredExtensions="http://www.w3.org/1999/xhtml" width="200"><p xmlns="http://www.w3.org/1999/xhtml">Here is an HTML paragraph that requires word wrap</p></foreignObject><text font-size="16"><tspan x="0" y="14">Here is an SVG paragraph</tspan><tspan x="0" y="32">that requires word wrap.</tspan></text></switch></svg>
2 changes: 1 addition & 1 deletion test/fixtures/mathml/output.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang=en><meta charset=utf8><title>MathML</title><h1>The quadratic formula</h1><p><math><mi>x</mi><mo>=</mo><mfrac><mrow><mo form=prefix></mo><mi>b</mi><mo>±</mo><msqrt><msup><mi>b</mi><mn>2</mn></msup><mo></mo><mn>4</mn><mo></mo><mi>a</mi><mo></mo><mi>c</mi></msqrt></mrow><mrow><mn>2</mn><mo></mo><mi>a</mi></mrow></mfrac></math>
<!doctypehtml><html lang=en><meta charset=utf8><title>MathML</title><h1>The quadratic formula</h1><p><math><mi>x</mi><mo>=</mo><mfrac><mrow><mo form=prefix></mo><mi>b</mi><mo>±</mo><msqrt><msup><mi>b</mi><mn>2</mn></msup><mo></mo><mn>4</mn><mo></mo><mi>a</mi><mo></mo><mi>c</mi></msqrt></mrow><mrow><mn>2</mn><mo></mo><mi>a</mi></mrow></mfrac></math>
2 changes: 1 addition & 1 deletion test/fixtures/small/output.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang=en-GB><meta charset=utf8><script src=index.js></script><link href=index.css rel=stylesheet><title>Foo &amp bar</title><h1 class=foo>bar bar</h1><p id=alfred><strong>foo</strong> <em>bar</em></p><button onclick=return!1 type=button>Alpha</button>
<!doctypehtml><html lang=en-GB><meta charset=utf8><script src=index.js></script><link href=index.css rel=stylesheet><title>Foo &amp bar</title><h1 class=foo>bar bar</h1><p id=alfred><strong>foo</strong> <em>bar</em></p><button onclick=return!1 type=button>Alpha</button>
2 changes: 1 addition & 1 deletion test/fixtures/svg/output.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang=en><meta charset=utf8><title>SVG</title><svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>Variable: shape</title><rect height="40" width="40" x="55" y="35"/><circle cx="75" cy="110" r="25"/><path d="M 50 145 L 100 145 L 75 185 z"/></svg>
<!doctypehtml><html lang=en><meta charset=utf8><title>SVG</title><svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>Variable: shape</title><rect height="40" width="40" x="55" y="35"/><circle cx="75" cy="110" r="25"/><path d="M 50 145 L 100 145 L 75 185 z"/></svg>

0 comments on commit 2a0b565

Please sign in to comment.