Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the new comment pattern expected? #300

Closed
saschanaz opened this issue Nov 29, 2018 · 3 comments
Closed

Is the new comment pattern expected? #300

saschanaz opened this issue Nov 29, 2018 · 3 comments

Comments

@saschanaz
Copy link

saschanaz commented Nov 29, 2018

Oops, I hit enter too early.

I found that 2.19 now emits <!-- -0.534247% --> rather than previous <!-- _hyper: -1946284234; -->. Is this expected? We in ReSpec has been filtering the comments out based on _hyper: prefix, so this is an observable change.

@WebReflection
Copy link
Owner

Yes, the comment content has changed to avoid SVG issues with numeric attributes 'cause browser throws errors instead of ignoring unexpected values.

There are also two kind of UIDs, one numeric and one as property, because of IE, that's why.

If I knew somebody was using hyperHTML internals indirectly I would've warned but the TL;DR story is that you shouldn't, IMO, but since I believe there is a reason I can help you with details, if necessary, but I don't think it's more complex than this:

https://github.com/WebReflection/domtagger/blob/master/esm/constants.js#L3-L5

Please also note there are no spaces around.

@saschanaz
Copy link
Author

Thank you for the explanation! I had to make sure this is a stable change.

@WebReflection
Copy link
Owner

Thank you for the explanation! I had to make sure this is a stable change.

It's been tested in every browser I could and all warnings are gone with either regular attributes, style, or SVG numeric values so it's more than stable now.

Apologies for the inconvenience though, if I need to do extra changes I'll ping you back.

Cheers

douglasduteil added a commit to douglasduteil/hyperhtml-serializer that referenced this issue Dec 26, 2018
Current serializer code is working for hyperhtml 2.4 to 2.18.
see WebReflection/hyperHTML#300
douglasduteil added a commit to douglasduteil/hyperhtml-serializer that referenced this issue Dec 26, 2018
Following 4dbd38c

BREAKING CHANGE: changed hyperhtml comment regular expression

Since hyperhtml 2.1.9, the comment content has changed to avoid SVG issues with numeric attributes
see WebReflection/hyperHTML#300
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

No branches or pull requests

2 participants