You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var Prism = require('prismjs');
// The code snippet you want to highlight, as a string
var code = "var data = 1;";
// Returns a highlighted HTML string
var html = Prism.highlight(code, Prism.languages.javascript);
In order to use the Prism API, does the language have to be declared? And the code separated? If so, this would involve parsing the generated HTML to find code block?
Is the point of doing this to reduce load on client-side JavaScript, thus making it a bit faster? If so, maybe this could be abstracted out as a plugin, and not part of core tobiko?
Instead of using Prism, parse and highlight code block in the
import_contents
task usingpygmentize-bundled
(async) https://github.com/chjj/marked#highlightThe text was updated successfully, but these errors were encountered: