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

pre+code tag instead of just pre #84

Closed
mesqueeb opened this issue May 2, 2020 · 1 comment
Closed

pre+code tag instead of just pre #84

mesqueeb opened this issue May 2, 2020 · 1 comment

Comments

@mesqueeb
Copy link
Contributor

mesqueeb commented May 2, 2020

In order to make PrismJS syntax highlighting work, it requires all code blocks to be formatted like so:

<pre>
  <code>
// the code
  </code>
</pre>

But snarkdown only uses <pre> without <code>.

My request is that snarkdown uses <pre><code> by default OR via an option.

From the PrismJS docs:

Encourages good author practices. Other highlighters encourage or even force you to use elements that are semantically wrong, like <pre> (on its own) or <script>. Prism forces you to use the correct element for marking up code: <code>. On its own for inline code, or inside a <pre> for blocks of code. In addition, the language is defined through the way recommended in the HTML5 draft: through a language-xxxx class.

https://prismjs.com/#features-full

@mesqueeb
Copy link
Contributor Author

mesqueeb commented May 3, 2020


solved by this PR 😉

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

1 participant