🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
76
node_modules/micromark-extension-mdx-jsx/lib/jsx-text.js
generated
vendored
Normal file
76
node_modules/micromark-extension-mdx-jsx/lib/jsx-text.js
generated
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
/**
|
||||
* @typedef {import('micromark-factory-mdx-expression').Acorn} Acorn
|
||||
* @typedef {import('micromark-factory-mdx-expression').AcornOptions} AcornOptions
|
||||
* @typedef {import('micromark-util-types').Construct} Construct
|
||||
* @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
|
||||
* @typedef {import('micromark-util-types').Tokenizer} Tokenizer
|
||||
*/
|
||||
|
||||
import {factoryTag} from './factory-tag.js'
|
||||
|
||||
/**
|
||||
* Parse JSX (text).
|
||||
*
|
||||
* @param {Acorn | undefined} acorn
|
||||
* Acorn parser to use (optional).
|
||||
* @param {AcornOptions | undefined} acornOptions
|
||||
* Configuration for acorn.
|
||||
* @param {boolean | undefined} addResult
|
||||
* Whether to add `estree` fields to tokens with results from acorn.
|
||||
* @returns {Construct}
|
||||
* Construct.
|
||||
*/
|
||||
export function jsxText(acorn, acornOptions, addResult) {
|
||||
return {
|
||||
tokenize: tokenizeJsxText
|
||||
}
|
||||
|
||||
/**
|
||||
* MDX JSX (text).
|
||||
*
|
||||
* ```markdown
|
||||
* > | a <b />.
|
||||
* ^^^^^
|
||||
* ```
|
||||
*
|
||||
* @this {TokenizeContext}
|
||||
* @type {Tokenizer}
|
||||
*/
|
||||
function tokenizeJsxText(effects, ok, nok) {
|
||||
return factoryTag.call(
|
||||
this,
|
||||
effects,
|
||||
ok,
|
||||
nok,
|
||||
acorn,
|
||||
acornOptions,
|
||||
addResult,
|
||||
true,
|
||||
'mdxJsxTextTag',
|
||||
'mdxJsxTextTagMarker',
|
||||
'mdxJsxTextTagClosingMarker',
|
||||
'mdxJsxTextTagSelfClosingMarker',
|
||||
'mdxJsxTextTagName',
|
||||
'mdxJsxTextTagNamePrimary',
|
||||
'mdxJsxTextTagNameMemberMarker',
|
||||
'mdxJsxTextTagNameMember',
|
||||
'mdxJsxTextTagNamePrefixMarker',
|
||||
'mdxJsxTextTagNameLocal',
|
||||
'mdxJsxTextTagExpressionAttribute',
|
||||
'mdxJsxTextTagExpressionAttributeMarker',
|
||||
'mdxJsxTextTagExpressionAttributeValue',
|
||||
'mdxJsxTextTagAttribute',
|
||||
'mdxJsxTextTagAttributeName',
|
||||
'mdxJsxTextTagAttributeNamePrimary',
|
||||
'mdxJsxTextTagAttributeNamePrefixMarker',
|
||||
'mdxJsxTextTagAttributeNameLocal',
|
||||
'mdxJsxTextTagAttributeInitializerMarker',
|
||||
'mdxJsxTextTagAttributeValueLiteral',
|
||||
'mdxJsxTextTagAttributeValueLiteralMarker',
|
||||
'mdxJsxTextTagAttributeValueLiteralValue',
|
||||
'mdxJsxTextTagAttributeValueExpression',
|
||||
'mdxJsxTextTagAttributeValueExpressionMarker',
|
||||
'mdxJsxTextTagAttributeValueExpressionValue'
|
||||
)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue