fix handling of plain MFM tag
ci/woodpecker/push/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline failed Details
ci/woodpecker/push/lint-sw Pipeline failed Details
ci/woodpecker/push/lint-client Pipeline failed Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/test Pipeline failed Details

This commit is contained in:
Johann150 2023-11-24 16:43:03 +01:00
parent 101ea21747
commit 8b16ead35c
Signed by: Johann150
GPG Key ID: 9EE6577A2A06F8F1
1 changed files with 4 additions and 0 deletions

View File

@ -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');