Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

HTMLCommentOpen stops working in .js files #38

Closed
bmeck opened this issue Aug 14, 2017 · 6 comments
Closed

HTMLCommentOpen stops working in .js files #38

bmeck opened this issue Aug 14, 2017 · 6 comments
Labels

Comments

@bmeck
Copy link

bmeck commented Aug 14, 2017

Strangely, HTMLCommentClose (-->) appears to work.

// entry.js
<!--
require('@std/esm');
require('./a')
-->
// a.js
<!--
-->
@jdalton
Copy link
Member

jdalton commented Aug 14, 2017

Thanks @bmeck, I think?

Whoah HTMLComments valid in Node?
This may be an acorn limitation.

@bmeck
Copy link
Author

bmeck commented Aug 14, 2017

HTMLComments is valid in all Script goals

@jdalton
Copy link
Member

jdalton commented Aug 14, 2017

Ah, related to tc39/ecma262#949 and acornjs/acorn#572.
It looks like they aren't allowed in module code (or don't have the same meaning).

@bmeck
Copy link
Author

bmeck commented Aug 14, 2017

Correct, they are not valid in Module code, but this is hitting all .js files not ones in the Module goal

@jdalton
Copy link
Member

jdalton commented Aug 14, 2017

Ah, 👌 !

@jdalton jdalton added bug and removed acorn labels Aug 15, 2017
@jdalton
Copy link
Member

jdalton commented Aug 15, 2017

Fixed by 65cc9cf.
I'll be adding a round of unit tests over the next couple of days to solidify support.

@jdalton jdalton closed this as completed Aug 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants