Skip to content

Dont throw parse error on doctype declaration#255

Merged
Rich-Harris merged 2 commits intosveltejs:masterfrom
msteitle:dontThrowParseErrorOnDoctypeDeclaration
Jan 18, 2017
Merged

Dont throw parse error on doctype declaration#255
Rich-Harris merged 2 commits intosveltejs:masterfrom
msteitle:dontThrowParseErrorOnDoctypeDeclaration

Conversation

@msteitle
Copy link
Copy Markdown

@msteitle msteitle commented Jan 18, 2017

Hi Svelte gang. I'm trying out svelte for the first time for some server-side rendering and I ran across this bug. I want to note that this is potentially my first open-source contribution. ✊

I am importing index.html via svelte/ssr/register, but the compiler throws a ParseError on the <!doctype> tag because the regular expression for valid tag names doesn't account for the leading !. For the same reason, "doctype" isn't recognized as a valid void element.

It's a pretty simple bug so I hope that this explanation is sufficient.

@Rich-Harris Rich-Harris merged commit 9a2b827 into sveltejs:master Jan 18, 2017
@Rich-Harris
Copy link
Copy Markdown
Member

I want to note that this is potentially my first open-source contribution. ✊

🤘 🎉

Hadn't even thought about doctype, but this makes total sense. Thanks! Have released version 1.6.5 with this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants