harmsk / atom-html-preview

Atom HTML Live Preview Package
MIT License
174 stars 73 forks source link

breaks with XHTML5 #89

Open garretwilson opened 8 years ago

garretwilson commented 8 years ago

This plugin breaks out of the box with XHTML5. My file begins with:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html><html  lang="en-us"  xmlns="http://www.w3.org/1999/xhtml">

The plugin fails with:

error on line 1 at column 85: XML declaration allowed only at the start of the document
garretwilson commented 8 years ago

Even if I remove the XML declaration, the plugin fails with:

error on line 1 at column 80: internal error: detected an error in element content

Crazy---this is the most basic of HTML5 structures, and well-formed at that.

colelawrence commented 8 years ago

I'm not seeing this issue with a file like:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html><html  lang="en-us"  xmlns="http://www.w3.org/1999/xhtml">
Hello
</html

What environment are you in?

garretwilson commented 8 years ago

Windows 10 Professional 64-bit.

colelawrence commented 8 years ago

@garretwilson thank you.

Does the previous example break in your environment?

Would you be willing to try recreating the same error with the latest changes in the git repo?

garretwilson commented 8 years ago

After not touching it for a while, I just tried it with version 0.1.19 and is no longer breaking. Thanks.

Do I need to add a label or something before closing this issue?