45 lines
1.0 KiB
TypeScript
45 lines
1.0 KiB
TypeScript
import { Options } from 'mdast-util-to-markdown';
|
|
import { Extension } from 'mdast-util-from-markdown';
|
|
|
|
/**
|
|
* Extension for `mdast-util-from-markdown` to enable mark highlight.
|
|
*
|
|
* @type {FromMarkdownExtension}
|
|
*/
|
|
declare const highlightMarkFromMarkdown: Extension;
|
|
/**
|
|
* Extension for `mdast-util-to-markdown` to enable mark highlight.
|
|
*/
|
|
declare const highlightMarkToMarkdown: Options;
|
|
|
|
declare module 'mdast-util-to-markdown' {
|
|
interface ConstructNameMap {
|
|
/**
|
|
* Whole m.
|
|
*
|
|
* ```markdown
|
|
* > | ==a==
|
|
* ^^^^^
|
|
* ```
|
|
*/
|
|
highlight: 'highlight';
|
|
}
|
|
}
|
|
declare module 'mdast' {
|
|
interface Highlight extends Parent {
|
|
type: 'highlight';
|
|
children: PhrasingContent[];
|
|
}
|
|
interface StaticPhrasingContentMap {
|
|
highlight: Highlight;
|
|
}
|
|
interface PhrasingContentMap {
|
|
highlight: Highlight;
|
|
}
|
|
interface RootContentMap {
|
|
highlight: Highlight;
|
|
}
|
|
}
|
|
|
|
export { highlightMarkFromMarkdown, highlightMarkToMarkdown };
|