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

Latest Prism JavaScript removes all my in-code markup. #1134

Closed
garretwilson opened this issue May 8, 2017 · 3 comments
Closed

Latest Prism JavaScript removes all my in-code markup. #1134

garretwilson opened this issue May 8, 2017 · 3 comments

Comments

@garretwilson
Copy link

I'm using the "coy" theme, all languages, and the following plugins:

  • Line Numbers
  • Keep Markup
  • Command Line

The last version seems to have been from around 2016-11-24. I had certain code for a format I'm developing --- let's call it "foobar". There is not yet a Prism language plugin for it. Still I'm preparing for the future, so I'm marking up all my code like this:

<pre class="line-numbers"><code class="language-foobar">
  blah <mark>blah</mark> <em>blah</em>

Even though Prism doesn't understand the "foobar" language, I still get a nice coy theme and I get may highlights and emphasis.

Until today, 2017-05-07, when I decided to upgrade to the latest Prism CSS and JavaScript. Just because the latest is always better, right?

Luckily I looked at my site before I published it. My page loads and I can see the highlights and emphasis briefly, then Prism (it seems to be the JavaScript) removes it all in a flash, and I'm looking at a plain code segment. The other pages that have languages Prism recognizes (e.g. html, java) still show <mark> and such.

I'm having to revert to the earlier Prism.

Why is Prism now removing markup from my code, just because it doesn't recognize the language? What does one have to do with the other? If I said I want markup, I want markup; the language is irrelevant.

Must be a bug.

@LeaVerou
Copy link
Member

LeaVerou commented May 8, 2017

Any chance you could make an online testcase for this? Thanks!

@Golmote Golmote closed this as completed in 70cb472 May 8, 2017
@Golmote
Copy link
Contributor

Golmote commented May 8, 2017

Thanks for reporting. I was able to reproduce the issue. It should be fixed now.

@garretwilson
Copy link
Author

Thank you.

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

3 participants