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

Wrong embedded language detection #1240

Closed
uhyo opened this issue Dec 2, 2017 · 1 comment
Closed

Wrong embedded language detection #1240

uhyo opened this issue Dec 2, 2017 · 1 comment

Comments

@uhyo
Copy link

uhyo commented Dec 2, 2017

Hi. I'm not sure this is actually a bug or a kind of "edge cases",
but the following HTML snippet is wrongly highlighted by Prism.js. It reproduces at the test page for now.

<script>
  let str = `
    <p>hello</p>
    <style>
      .foo { color: blue; }
    </style>
  `;
</script>

It seems that it fails to detect the embedded JavaScirpt code due to a style tag in a string literal.
Thanks.

@uhyo uhyo changed the title Wrong embedded languade detection Wrong embedded language detection Dec 2, 2017
@Golmote Golmote closed this as completed in 7dc1e45 Dec 5, 2017
@Golmote
Copy link
Contributor

Golmote commented Dec 5, 2017

Nice catch! Thanks for reporting!

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