🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
11
node_modules/remark-parse/lib/index.d.ts
generated
vendored
Normal file
11
node_modules/remark-parse/lib/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
export default function remarkParse(
|
||||
this: import('unified').Processor<
|
||||
import('mdast').Root,
|
||||
import('mdast').Root,
|
||||
void,
|
||||
void
|
||||
>,
|
||||
...settings: [import('mdast-util-from-markdown').Options?] | void[]
|
||||
): void
|
||||
export type Root = import('mdast').Root
|
||||
export type Options = import('mdast-util-from-markdown').Options
|
||||
31
node_modules/remark-parse/lib/index.js
generated
vendored
Normal file
31
node_modules/remark-parse/lib/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
* @typedef {import('mdast').Root} Root
|
||||
* @typedef {import('mdast-util-from-markdown').Options} Options
|
||||
*/
|
||||
|
||||
import {fromMarkdown} from 'mdast-util-from-markdown'
|
||||
|
||||
/**
|
||||
* @this {import('unified').Processor}
|
||||
* @type {import('unified').Plugin<[Options?] | void[], string, Root>}
|
||||
*/
|
||||
export default function remarkParse(options) {
|
||||
/** @type {import('unified').ParserFunction<Root>} */
|
||||
const parser = (doc) => {
|
||||
// Assume options.
|
||||
const settings = /** @type {Options} */ (this.data('settings'))
|
||||
|
||||
return fromMarkdown(
|
||||
doc,
|
||||
Object.assign({}, settings, options, {
|
||||
// Note: these options are not in the readme.
|
||||
// The goal is for them to be set by plugins on `data` instead of being
|
||||
// passed by users.
|
||||
extensions: this.data('micromarkExtensions') || [],
|
||||
mdastExtensions: this.data('fromMarkdownExtensions') || []
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
Object.assign(this, {Parser: parser})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue