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

Codesample plugin: allow inline code samples #3208

Closed
TimVevida opened this issue Sep 16, 2016 · 5 comments
Closed

Codesample plugin: allow inline code samples #3208

TimVevida opened this issue Sep 16, 2016 · 5 comments

Comments

@TimVevida
Copy link

Currently, the code sample plugin only supports code blocks (<pre>), while PrismJS supports two types of code:

  1. Block code, in the form <pre class="language-markup"><code> ... </code></pre>
  2. Inline code, in the form <code class="language-markup"> ... </code>

When using both inside an editor, the inline code is displayed partially according to the PrismJS styling (background color and padding), but the language-specific styling is not applied, and the inline code is not editable using the codesample dialog.

@jayarjo
Copy link
Contributor

jayarjo commented Sep 27, 2016

@spocke

@Afraithe
Copy link
Member

We have this as an internal ticket to work on, can't promise any specific release date though.

@TimVevida
Copy link
Author

Related question: the PrismJS documentation states that the class should be put on the code element, like so:

<pre><code class="language-markup"> ... </code></pre>

But the codesample-plugin puts the class on the <pre> element. Existing sources with the class on the <code> element rather than the <pre> element are not displayed correctly.

For backward compatibility, I think both methods should be supported (I noticed that PrismJS puts the class on both the <pre> and the <code> when rendering the highlighted code).

@tiny-stale-bot
Copy link
Collaborator

This issue is stale because it has been open 365 days with no activity. Please comment if you wish to keep this issue open or it will be closed in 30 days.

@tiny-stale-bot
Copy link
Collaborator

This issue was closed because it has been stalled for 30 days with no activity.

@tiny-stale-bot tiny-stale-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 15, 2024
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

5 participants