Refactor to move reparse of micromark htmlFlow token content into core micromarkParse implementation for simplicity and sharing.

This commit is contained in:
David Anson 2023-07-21 22:49:08 -07:00
parent 9646590496
commit e86fb7699d
11 changed files with 307 additions and 84 deletions

View file

@ -2624,6 +2624,99 @@ Generated by [AVA](https://avajs.dev).
],
endColumn: 5,
endLine: 45,
htmlFlowChildren: [
{
children: [
{
children: [
{
children: [
{
children: [],
endColumn: 4,
endLine: 43,
startColumn: 1,
startLine: 43,
text: '<p>',
type: 'htmlTextData',
},
],
endColumn: 4,
endLine: 43,
startColumn: 1,
startLine: 43,
text: '<p>',
type: 'htmlText',
},
{
children: [],
endColumn: 1,
endLine: 44,
startColumn: 4,
startLine: 43,
text: `␊
`,
type: 'lineEnding',
},
{
children: [],
endColumn: 11,
endLine: 44,
startColumn: 1,
startLine: 44,
text: 'HTML block',
type: 'data',
},
{
children: [],
endColumn: 1,
endLine: 45,
startColumn: 11,
startLine: 44,
text: `␊
`,
type: 'lineEnding',
},
{
children: [
{
children: [],
endColumn: 5,
endLine: 45,
startColumn: 1,
startLine: 45,
text: '</p>',
type: 'htmlTextData',
},
],
endColumn: 5,
endLine: 45,
startColumn: 1,
startLine: 45,
text: '</p>',
type: 'htmlText',
},
],
endColumn: 5,
endLine: 45,
startColumn: 1,
startLine: 43,
text: `<p>
HTML block␊
</p>`,
type: 'paragraph',
},
],
endColumn: 5,
endLine: 45,
startColumn: 1,
startLine: 43,
text: `<p>
HTML block␊
</p>`,
type: 'content',
},
],
startColumn: 1,
startLine: 43,
text: `<p>
@ -3131,6 +3224,47 @@ Generated by [AVA](https://avajs.dev).
],
endColumn: 35,
endLine: 51,
htmlFlowChildren: [
{
children: [
{
children: [
{
children: [
{
children: [],
endColumn: 35,
endLine: 51,
startColumn: 1,
startLine: 51,
text: '<!-- markdownlint-disable-file -->',
type: 'htmlTextData',
},
],
endColumn: 35,
endLine: 51,
startColumn: 1,
startLine: 51,
text: '<!-- markdownlint-disable-file -->',
type: 'htmlText',
},
],
endColumn: 35,
endLine: 51,
startColumn: 1,
startLine: 51,
text: '<!-- markdownlint-disable-file -->',
type: 'paragraph',
},
],
endColumn: 35,
endLine: 51,
startColumn: 1,
startLine: 51,
text: '<!-- markdownlint-disable-file -->',
type: 'content',
},
],
startColumn: 1,
startLine: 51,
text: '<!-- markdownlint-disable-file -->',