Skip to content

Commit

Permalink
(chore) hljs.regex helpers are missing from type refs (#3369)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaacko-torus committed Oct 26, 2021
1 parent 7028658 commit 2ccec7e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/regex.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function stripOptionsFromArgs(args) {
* Any of the passed expresssions may match
*
* Creates a huge this | this | that | that match
* @param {(RegExp | string)[] } args
* @param {(RegExp | string | { capture?: boolean })[]} args
* @returns {string}
*/
export function either(...args) {
Expand Down
7 changes: 7 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ declare module 'highlight.js' {
safeMode: () => void
versionString: string
vuePlugin: () => VuePlugin
regex: {
concat: (...args: (RegExp | string)[]) => string,
lookahead: (re: RegExp | string) => string,
either: (...args: (RegExp | string | { capture?: boolean })[]) => string,
optional: (re: RegExp | string) => string,
anyNumberOfTimes: (re: RegExp | string) => string
}
}

interface ModesAPI {
Expand Down

0 comments on commit 2ccec7e

Please sign in to comment.