import { VexHighlightConfig, VexHighlightOptions, VexHighlightResult } from './vex-highlight.model'; import * as i0 from "@angular/core"; export declare class VexHighlightService { constructor(options: VexHighlightOptions); /** * Core highlighting function. * @param name Accepts a language name, or an alias * @param value A string with the code to highlight. * @param ignoreIllegals When present and evaluates to a true value, forces highlighting to finish * even in case of detecting illegal syntax for the language instead of throwing an exception. * When present, the function will restart parsing from this state instead of initializing a new one */ highlight(name: string, value: string, ignoreIllegals: boolean): VexHighlightResult; /** * Highlighting with language detection. * @param value Accepts a string with the code to highlight * @param languageSubset An optional array of language names and aliases restricting detection to only those languages. * The subset can also be set with configure, but the local parameter overrides the option if set. */ highlightAuto(value: string, languageSubset: string[]): VexHighlightResult; /** * Applies highlighting to a DOM node containing code. * The function uses language detection by default but you can specify the language in the class attribute of the DOM node. * See the class reference for all available language names and aliases. * @param block The element to apply highlight on. */ highlightBlock(block: HTMLElement): void; /** * Configures global options: */ configure(config: VexHighlightConfig): void; /** * Applies highlighting to all
.. blocks on a page.
*/
initHighlighting(): void;
/**
* Adds new language to the library under the specified name. Used mostly internally.
* @param name A string with the name of the language being registered
* @param language A function that returns an object which represents the language definition.
* The function is passed the hljs object to be able to use common regular expressions defined within it.
*/
registerLanguage(name: string, language: any): void;
/**
* @return The languages names list.
*/
listLanguages(): string[];
/**
* Looks up a language by name or alias.
* @param name Language name
* @return The language object if found, undefined otherwise.
*/
getLanguage(name: string): any;
static ɵfac: i0.ɵɵFactoryDeclaration