From 06a5169eeb94cd9e723266e234b79883db746718 Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Tue, 6 Dec 2016 18:41:20 -0500 Subject: [PATCH] =?UTF-8?q?require=20void=20elements=20to=20be=20lowercase?= =?UTF-8?q?=20=E2=80=93=20fixes=20#137?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compiler/parse/state/tag.js | 2 +- test/compiler/component-not-void/Link.html | 1 + test/compiler/component-not-void/_config.js | 3 +++ test/compiler/component-not-void/main.html | 11 +++++++++++ 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 test/compiler/component-not-void/Link.html create mode 100644 test/compiler/component-not-void/_config.js create mode 100644 test/compiler/component-not-void/main.html diff --git a/compiler/parse/state/tag.js b/compiler/parse/state/tag.js index d8ac4fd776..e33d9b6451 100644 --- a/compiler/parse/state/tag.js +++ b/compiler/parse/state/tag.js @@ -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 = { diff --git a/test/compiler/component-not-void/Link.html b/test/compiler/component-not-void/Link.html new file mode 100644 index 0000000000..e147954fa0 --- /dev/null +++ b/test/compiler/component-not-void/Link.html @@ -0,0 +1 @@ +

{{yield}}

diff --git a/test/compiler/component-not-void/_config.js b/test/compiler/component-not-void/_config.js new file mode 100644 index 0000000000..174d01f1a5 --- /dev/null +++ b/test/compiler/component-not-void/_config.js @@ -0,0 +1,3 @@ +export default { + html: '

Hello

' +}; diff --git a/test/compiler/component-not-void/main.html b/test/compiler/component-not-void/main.html new file mode 100644 index 0000000000..99f9a931b4 --- /dev/null +++ b/test/compiler/component-not-void/main.html @@ -0,0 +1,11 @@ +Hello + +