-
Notifications
You must be signed in to change notification settings - Fork 37
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
Default ability to add a language parameter to @markup #51
Comments
You can already create a custom variable to pass information along to the templates if you want. Here's an example of a custom variable, custom parser and a custom template that would solve this. Custom CSS/Comment: // @lang scss Custom JavaScript/Parser: dss.parser( 'lang', function( i, line, block ) {
return line;
}); Custom HTML/Template: <h3>Example</h3>
<div class="example">
{{ markup.example | safe }}
</div>
<h1>{{ state.name }}</h1>
<pre><code class="language-{{ lang }}">
{{ markup.escaped }}
</code></pre>
Example: // @markup html
// <h1>A Header Example</h1> // @markup jade
// h1 A Header Example // @markup markdown
// # A Header Example |
Further thought... this is definitely a custom parser situation. I'm going to write an example of how you can do this sometime over the next week but it is 100% possible to do right now if you took some time to investigate writing one yourself. |
It is, I figured out how to customize it. |
I'm trying to use prism and I need the ability to pass a language param to the code
I figured it could work something like this to make it simple.
The text was updated successfully, but these errors were encountered: