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

Keep Markup: the markup is removed if it's the last element #1618

Open
ggrossetie opened this issue Nov 18, 2018 · 0 comments
Open

Keep Markup: the markup is removed if it's the last element #1618

ggrossetie opened this issue Nov 18, 2018 · 0 comments

Comments

@ggrossetie
Copy link
Contributor

I don't if this is intended or not but if the markup (in the exemple below <div class="keep"></div>") is the last element, the Keep Markup plugin will remove it:

<!DOCTYPE html>
<html>
  <head>
    <link href="prism.css" rel="stylesheet" />
    <style>
    .keep {
      height: 1rem;
      width: 1rem;
      background-color: red;
    }
    </style>
  </head>
  <body>
    <pre><code class="language-css"><div class="keep"></div>p { color: red }<div class="keep"></div></code></pre>
    <script src="prism.js"></script>
  </body>
</html>

And here's the result:

error

As you can see the first <div class="keep"></div> is preserved but the last is removed.
If I add some content after the div then it's working as expected:

good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants