highlight.js
Advanced tools
Comparing version 10.1.0 to 10.1.1
@@ -1214,3 +1214,3 @@ // https://github.com/substack/deep-freeze/blob/master/index.js | ||
var version = "10.1.0"; | ||
var version = "10.1.1"; | ||
@@ -1230,2 +1230,3 @@ /* | ||
* @param {any} hljs - object that is extended (legacy) | ||
* @returns {HLJSApi} | ||
*/ | ||
@@ -1232,0 +1233,0 @@ const HLJS = function(hljs) { |
@@ -88,3 +88,3 @@ /** | ||
concat(SEQUENCE_ALLOWING_UNDERSCORES('a-fA-F0-9'), /\.?/), | ||
concat(/\./, SEQUENCE_ALLOWING_UNDERSCORES('a-fA-F0-9')), | ||
concat(/\./, SEQUENCE_ALLOWING_UNDERSCORES('a-fA-F0-9')) | ||
), | ||
@@ -91,0 +91,0 @@ /([pP][+-]?(\d+))?/, |
@@ -9,3 +9,3 @@ { | ||
"homepage": "https://highlightjs.org/", | ||
"version": "10.1.0", | ||
"version": "10.1.1", | ||
"author": { | ||
@@ -12,0 +12,0 @@ "name": "Ivan Sagalaev", |
@@ -6,3 +6,5 @@ /* Public API */ | ||
interface HLJSApi { | ||
type HLJSApi = PublicApi & ModesAPI | ||
interface PublicApi { | ||
highlight: (languageName: string, code: string, ignoreIllegals?: boolean, continuation?: Mode) => HighlightResult | ||
@@ -28,3 +30,3 @@ highlightAuto: (code: string, languageSubset?: string[]) => AutoHighlightResult | ||
interface HLJSApi { | ||
interface ModesAPI { | ||
SHEBANG: (mode?: Partial<Mode> & {binary?: string | RegExp}) => Mode | ||
@@ -48,3 +50,3 @@ BACKSLASH_ESCAPE: Mode | ||
END_SAME_AS_BEGIN: (mode: Mode) => Mode | ||
// build in regex | ||
// built in regex | ||
IDENT_RE: string | ||
@@ -58,10 +60,4 @@ UNDERSCORE_IDENT_RE: string | ||
type LanguageFn = (hljs: HLJSApi) => Language | ||
type LanguageFn = (hljs?: HLJSApi) => Language | ||
// interface RawLanguage { | ||
// name?: string | ||
// aliases?: string[] | ||
// rawDefinition?: () => Language | ||
// } | ||
interface HighlightResult { | ||
@@ -80,2 +76,3 @@ relevance : number | ||
} | ||
interface AutoHighlightResult extends HighlightResult {} | ||
@@ -88,5 +85,2 @@ interface illegalData { | ||
interface AutoHighlightResult extends HighlightResult { | ||
} | ||
type PluginEvent = | ||
@@ -98,3 +92,5 @@ 'before:highlight' | ||
type HLJSPlugin = { [K in PluginEvent]? : any } | ||
type HLJSPlugin = { | ||
[K in PluginEvent]? : any | ||
} | ||
@@ -220,1 +216,20 @@ interface EmitterConstructor { | ||
} | ||
// deprecated API since v10 | ||
// declare module 'highlight.js/lib/highlight.js'; | ||
declare module 'highlight.js' { | ||
export = hljs; | ||
} | ||
declare module 'highlight.js/lib/core' { | ||
export = hljs; | ||
} | ||
declare module 'highlight.js/lib/core.js' { | ||
export = hljs; | ||
} | ||
declare module 'highlight.js/lib/languages/*' { | ||
export default function(hljs?: HLJSApi): LanguageDetail; | ||
} |
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
1505637
34184