gitter-markdown-processor
Advanced tools
Comparing version 7.1.3 to 7.2.0
@@ -16,3 +16,2 @@ /*jshint globalstrict:true, trailing:false, unused:true, node:true */ | ||
if(!plainText) return result; | ||
return detectLang(plainText) | ||
@@ -19,0 +18,0 @@ .then(function(lang) { |
@@ -10,2 +10,3 @@ /*jshint globalstrict:true, trailing:false, unused:true, node:true */ | ||
var matcher = require('./github-url-matcher'); | ||
var htmlencode = require('htmlencode'); | ||
@@ -24,3 +25,81 @@ var options = { gfm: true, tables: true, sanitize: true, breaks: true, linkify: true, skipComments: true }; | ||
highlight.configure({classPrefix: ''}); | ||
highlight.configure( { classPrefix: '', languages : [ | ||
"apache", | ||
"applescript", | ||
"css", | ||
"bash", | ||
"clojure-repl", | ||
"clojure", | ||
"javascript", | ||
"coffeescript", | ||
"cpp", | ||
"cs", | ||
"d", | ||
"dart", | ||
"delphi", | ||
"diff", | ||
"django", | ||
"dockerfile", | ||
"dos", | ||
"elixir", | ||
"erb", | ||
"erlang-repl", | ||
"erlang", | ||
"fortran", | ||
"fsharp", | ||
"gcode", | ||
"gherkin", | ||
"go", | ||
"gradle", | ||
"groovy", | ||
"haml", | ||
"handlebars", | ||
"haskell", | ||
"http", | ||
"ini", | ||
"java", | ||
"json", | ||
"kotlin", | ||
"less", | ||
"lisp", | ||
"livescript", | ||
"lua", | ||
"makefile", | ||
"markdown", | ||
"mathematica", | ||
"matlab", | ||
"nginx", | ||
"objectivec", | ||
"perl", | ||
"php", | ||
"powershell", | ||
"prolog", | ||
"puppet", | ||
"python", | ||
"q", | ||
"r", | ||
"rib", | ||
"rsl", | ||
"ruby", | ||
"rust", | ||
"scala", | ||
"scheme", | ||
"scilab", | ||
"scss", | ||
"smali", | ||
"smalltalk", | ||
"sml", | ||
"sql", | ||
"stylus", | ||
"swift", | ||
"tcl", | ||
"tex", | ||
"typescript", | ||
"vbnet", | ||
"vbscript-html", | ||
"vbscript", | ||
"vim", | ||
"x86asm", | ||
"xml" | ||
]}); | ||
@@ -54,3 +133,7 @@ | ||
if (highlight.listLanguages().indexOf(lang) !== -1) | ||
if (lang === "text") { | ||
return util.format('<pre><code class="text">%s</code></pre>', htmlencode.htmlEncode(code)); | ||
} | ||
if (highlight.getLanguage(lang)) | ||
return util.format('<pre><code class="%s">%s</code></pre>', lang, highlight.highlight(lang, code).value); | ||
@@ -57,0 +140,0 @@ |
{ | ||
"name": "gitter-markdown-processor", | ||
"version": "7.1.3", | ||
"version": "7.2.0", | ||
"description": "parses gitter chat messages, but in its own process", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"gitter-marked": "^0.9.0", | ||
"highlight.js": "git://github.com/gitterHQ/highlight.js#6523cbb6e3f2a9374ea96e82f977ef57ef8cdf59", | ||
"highlight.js": "~8.5.0", | ||
"htmlencode": "0.0.4", | ||
@@ -11,0 +11,0 @@ "katex": "0.1.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Git dependency
Supply chain riskContains a dependency which resolves to a remote git URL. Dependencies fetched from git URLs are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
26549
573
0
1
+ Addedhighlight.js@8.5.0(transitive)
Updatedhighlight.js@~8.5.0