Skip to content

Commit

Permalink
require void elements to be lowercase – fixes #137
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Dec 6, 2016
1 parent 384e724 commit 06a5169
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/parse/state/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { trimStart, trimEnd } from '../utils/trim.js';
import { decodeCharacterReferences } from '../utils/html.js';

const validTagName = /^[a-zA-Z]{1,}:?[a-zA-Z0-9\-]*/;
const voidElementNames = /^(?:area|base|br|col|command|doctype|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/i;
const voidElementNames = /^(?:area|base|br|col|command|doctype|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;
const invalidUnquotedAttributeCharacters = /[\s"'=<>\/`]/;

const specials = {
Expand Down
1 change: 1 addition & 0 deletions test/compiler/component-not-void/Link.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>{{yield}}</p>
3 changes: 3 additions & 0 deletions test/compiler/component-not-void/_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
html: '<p>Hello</p>'
};
11 changes: 11 additions & 0 deletions test/compiler/component-not-void/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Link>Hello</Link>

<script>
import Link from './Link.html';

export default {
components: {
Link
}
};
</script>

0 comments on commit 06a5169

Please sign in to comment.