Comparing version 0.1.0 to 0.1.1
@@ -66,3 +66,3 @@ var hljs = require('highlight.js'); | ||
function highlight(str, lang){ | ||
if (!lang) return hljs.highlightAuto(str); | ||
if (!lang || !hljs.getLanguage(lang)) return hljs.highlightAuto(str); | ||
@@ -69,0 +69,0 @@ if (lang === 'plain'){ |
@@ -39,5 +39,5 @@ var escapeRegExp = require('./escape_regexp'); | ||
Permalink.prototype.parse = function(str){ | ||
var match = str.match(this.regex), | ||
params = this.params, | ||
result = {}; | ||
var match = str.match(this.regex); | ||
var params = this.params; | ||
var result = {}; | ||
@@ -44,0 +44,0 @@ if (!match) return; |
var escapeDiacritic = require('./escape_diacritic'); | ||
var escapeRegExp = require('./escape_regexp'); | ||
var rNull = /[^\x00-\x7F]+/g; | ||
var rControl = /[\u0000-\u001f]/g; | ||
var rSpecial = /[\s~`!@#\$%\^&\*\(\)\-_\+=\[\]\{\}\|\\;:"'<>,\.\?\/]+/g; | ||
@@ -14,4 +14,4 @@ | ||
var result = escapeDiacritic(str) | ||
// Remove null characters | ||
.replace(rNull, '') | ||
// Remove control characters | ||
.replace(rControl, '') | ||
// Replace special characters | ||
@@ -18,0 +18,0 @@ .replace(rSpecial, separator) |
{ | ||
"name": "hexo-util", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Utilities for Hexo.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
25471
1