forked from FoundKeyGang/FoundKey
fix handling of plain MFM tag
This commit is contained in:
parent
101ea21747
commit
8b16ead35c
1 changed files with 4 additions and 0 deletions
|
@ -51,6 +51,10 @@ export default defineComponent({
|
|||
|
||||
const genEl = (ast: mfm.MfmNode[]) => ast.map((token): VNode | VNode[] => {
|
||||
switch (token.type) {
|
||||
case 'plain':
|
||||
// for some reason `<plain>` is a token which just wraps a single text node
|
||||
token = token.children[0];
|
||||
// fallthrough
|
||||
case 'text': {
|
||||
const text = token.props.text.replace(/(\r\n|\n|\r)/g, '\n');
|
||||
|
||||
|
|
Loading…
Reference in a new issue