2025-09-05 14:59:21 +08:00

31 lines
883 B
TypeScript

import type { Plugin } from 'unified';
import type { Root } from 'mdast';
/**
* Configuration of remark-emoji plugin.
*/
export interface RemarkEmojiOptions {
/**
* Makes converted emoji and emoticon texts accessible by wrapping them with
* `span` element setting `role` and `aria-label` attributes.
*
* @defaultValue false
*/
accessible?: boolean;
/**
* Adds an extra whitespace after emoji.
* Useful when browser handle emojis with half character length and
* the following character is hidden.
*
* @defaultValue false
*/
padSpaceAfter?: boolean;
/**
* Whether to support emoticon shortcodes (e.g. :-) will be replaced by 😃)
*
* @defaultValue false
*/
emoticon?: boolean;
}
declare const plugin: Plugin<[(RemarkEmojiOptions | null | undefined)?], Root>;
export default plugin;