Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Support html code lang

  • Loading branch information...
commit bb2c0534e0a61054e52a47bc9f0ded076d374027 1 parent 81d8ffe
@gjtorikian authored
Showing with 5 additions and 3 deletions.
  1. +4 −2 lib/namp.js
  2. +1 −1  package.json
View
6 lib/namp.js
@@ -643,11 +643,13 @@ function tok() {
if (!token.escaped)
token.text = escape(token.text, true);
}
- else if (token.lang && token.lang !== "no-highlight")
+ else if (token.lang && token.lang !== "no-highlight") {
+ token.lang = token.lang === "html" ? "xml" : token.lang;
token.text = hljs.highlight(token.lang, token.text).value;
+ }
else if (!token.lang)
token.text = hljs.highlightAuto(token.text).value;
- // intentionally skip 'no-highlight'
+ // intentionally skip 'no-highlight'
return '<pre><code'
+ (token.lang
View
2  package.json
@@ -1,6 +1,6 @@
{
"name" : "namp",
- "version" : "0.2.8",
+ "version" : "0.2.9",
"description" : "Markdown parser for Node, with Maruku, GFM, and PHP Extras support, plus more.",
"keywords" : [ "markdown", "maruku", "gfm", "text processing", "ast" ],
"maintainers" : [
Please sign in to comment.
Something went wrong with that request. Please try again.