Comparing version 1.9.0 to 1.9.1
10
index.js
@@ -1,13 +0,3 @@ | ||
/** | ||
* @author Titus Wormer | ||
* @copyright 2016 Titus Wormer | ||
* @license MIT | ||
* @module lowlight | ||
* @fileoverview Virtual syntax highlighting for virtual | ||
* DOMs and non-HTML things. | ||
*/ | ||
'use strict'; | ||
/* Expose. */ | ||
var low = module.exports = require('./lib/core.js'); | ||
@@ -14,0 +4,0 @@ |
@@ -1,13 +0,3 @@ | ||
/** | ||
* @author Titus Wormer | ||
* @copyright 2016 Titus Wormer | ||
* @license MIT | ||
* @module lowlight:lowlight | ||
* @fileoverview Virtual syntax highlighting for virtual | ||
* DOMs and non-HTML things. | ||
*/ | ||
'use strict'; | ||
/* Dependencies. */ | ||
var high = require('highlight.js/lib/highlight.js'); | ||
@@ -19,3 +9,2 @@ | ||
/** High constructor. */ | ||
function High() {} | ||
@@ -35,6 +24,5 @@ | ||
/* Methods. */ | ||
var inherit = high.inherit; | ||
var own = {}.hasOwnProperty; | ||
/* Constants. */ | ||
var DEFAULT_PREFIX = 'hljs-'; | ||
@@ -45,7 +33,5 @@ var KEY_INSENSITIVE = 'case_insensitive'; | ||
/* Constant characters. */ | ||
var C_SPACE = ' '; | ||
var C_PIPE = '|'; | ||
/* Constant types. */ | ||
var T_ELEMENT = 'element'; | ||
@@ -60,7 +46,3 @@ var T_TEXT = 'text'; | ||
/* Methods. */ | ||
var own = {}.hasOwnProperty; | ||
/** | ||
* Highlighting with language detection. Accepts a string | ||
/* Highlighting with language detection. Accepts a string | ||
* with the code to highlight. Returns an object with the | ||
@@ -74,12 +56,3 @@ * following properties: | ||
* second-best heuristically detected language, may | ||
* be absent). | ||
* | ||
* @param {string} value - Source to highlight. | ||
* @param {Object?} [options={}] - Configuration. | ||
* @param {string} [options.prefix='hljs-'] - Highlight | ||
* prefix. | ||
* @param {Array.<string>} [options.subset] - List of | ||
* allowed languages. | ||
* @return {Object} - Highlighted `value`. | ||
*/ | ||
* be absent) */ | ||
function autoHighlight(value, options) { | ||
@@ -135,12 +108,3 @@ var settings = options || {}; | ||
/** | ||
* Highlighting `value` in the language `language`. | ||
* | ||
* @param {string} language - Language name. | ||
* @param {string} value - Source to highlight. | ||
* @param {Object?} [options={}] - Configuration. | ||
* @param {string} [options.prefix='hljs-'] - Highlight | ||
* prefix. | ||
* @return {Object} - Highlighted `value`. | ||
*/ | ||
/* Highlighting `value` in the language `language`. */ | ||
function highlight(language, value, options) { | ||
@@ -157,8 +121,3 @@ var settings = options || {}; | ||
/** | ||
* Register a language. | ||
* | ||
* @param {string} name - Name of language. | ||
* @param {Function} syntax - Syntax constructor. | ||
*/ | ||
/* Register a language. */ | ||
function registerLanguage(name, syntax) { | ||
@@ -177,16 +136,5 @@ var lang = languages[name] = syntax(low); | ||
/** | ||
* Core highlighting function. Accepts a language name, or | ||
/* Core highlighting function. Accepts a language name, or | ||
* an alias, and a string with the code to highlight. | ||
* Returns an object with the following properties: | ||
* | ||
* @param {string} name - Language name. | ||
* @param {string} value - Source to highlight. | ||
* @param {boolean} [ignore=false] - Whether to ignore | ||
* illegals. | ||
* @param {string?} [prefix] - Highlight prefix. | ||
* @param {boolean} [continuation] - Whether to continue | ||
* processing with `continuation`. | ||
* @return {Object} - Highlighted `value`. | ||
*/ | ||
* Returns an object with the following properties: */ | ||
function coreHighlight(name, value, ignore, prefix, continuation) { | ||
@@ -193,0 +141,0 @@ var continuations = {}; |
{ | ||
"name": "lowlight", | ||
"version": "1.9.0", | ||
"version": "1.9.1", | ||
"description": "Virtual syntax highlighting for virtual DOMs and non-HTML things", | ||
@@ -15,7 +15,3 @@ "license": "MIT", | ||
], | ||
"files": [ | ||
"index.js", | ||
"lib/core.js" | ||
], | ||
"repository": "https://github.com/wooorm/lowlight", | ||
"repository": "wooorm/lowlight", | ||
"bugs": "https://github.com/wooorm/lowlight/issues", | ||
@@ -25,4 +21,9 @@ "author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)", | ||
"Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)", | ||
"Ezra Lalonde <ezra@usefuliftrue.com>", | ||
"Shu Uesugi <shu@chibicode.com>" | ||
], | ||
"files": [ | ||
"index.js", | ||
"lib/core.js" | ||
], | ||
"dependencies": { | ||
@@ -33,7 +34,7 @@ "highlight.js": "~9.12.0" | ||
"browserify": "^14.0.0", | ||
"chalk": "^1.1.1", | ||
"chalk": "^2.0.0", | ||
"esmangle": "^1.0.0", | ||
"rehype": "4.0.0", | ||
"rehype": "5.0.0", | ||
"nyc": "^11.0.0", | ||
"remark-cli": "^3.0.0", | ||
"remark-cli": "^4.0.0", | ||
"remark-preset-wooorm": "^3.0.0", | ||
@@ -51,3 +52,3 @@ "tape": "^4.0.0", | ||
"lint": "xo", | ||
"test-api": "node test/index.js", | ||
"test-api": "node test", | ||
"test-coverage": "nyc --reporter lcov tape test/index.js", | ||
@@ -76,4 +77,6 @@ "test": "npm run build && npm run lint && npm run test-coverage" | ||
"remarkConfig": { | ||
"plugins": ["preset-wooorm"] | ||
"plugins": [ | ||
"preset-wooorm" | ||
] | ||
} | ||
} |
@@ -10,2 +10,4 @@ # lowlight [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] | ||
Want to use [Prism][] instead? Try [`refractor`][refractor]! | ||
## Table of Contents | ||
@@ -21,2 +23,3 @@ | ||
* [Browser](#browser) | ||
* [Related](#related) | ||
* [Projects](#projects) | ||
@@ -139,2 +142,6 @@ * [License](#license) | ||
## Related | ||
* [`refractor`][refractor] — Same, but based on [Prism][] | ||
## Projects | ||
@@ -192,1 +199,5 @@ | ||
[result]: #result | ||
[prism]: https://github.com/PrismJS/prism | ||
[refractor]: https://github.com/wooorm/refractor |
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the 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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
200
37133
698