🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
32
node_modules/mdast-util-to-markdown/lib/util/safe.d.ts
generated
vendored
Normal file
32
node_modules/mdast-util-to-markdown/lib/util/safe.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* Make a string safe for embedding in markdown constructs.
|
||||
*
|
||||
* In markdown, almost all punctuation characters can, in certain cases,
|
||||
* result in something.
|
||||
* Whether they do is highly subjective to where they happen and in what
|
||||
* they happen.
|
||||
*
|
||||
* To solve this, `mdast-util-to-markdown` tracks:
|
||||
*
|
||||
* * Characters before and after something;
|
||||
* * What “constructs” we are in.
|
||||
*
|
||||
* This information is then used by this function to escape or encode
|
||||
* special characters.
|
||||
*
|
||||
* @param {State} state
|
||||
* Info passed around about the current state.
|
||||
* @param {string | null | undefined} input
|
||||
* Raw value to make safe.
|
||||
* @param {SafeConfig} config
|
||||
* Configuration.
|
||||
* @returns {string}
|
||||
* Serialized markdown safe for embedding.
|
||||
*/
|
||||
export function safe(
|
||||
state: State,
|
||||
input: string | null | undefined,
|
||||
config: SafeConfig
|
||||
): string
|
||||
export type State = import('../types.js').State
|
||||
export type SafeConfig = import('../types.js').SafeConfig
|
||||
Loading…
Add table
Add a link
Reference in a new issue