spaces
This commit is contained in:
parent
f64e6e8646
commit
cc6b9f4cb0
|
@ -237,7 +237,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||||
style = '';
|
style = '';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const direction = token.props.args.out
|
const direction = token.props.args.out
|
||||||
? 'alternate-reverse'
|
? 'alternate-reverse'
|
||||||
: 'alternate';
|
: 'alternate';
|
||||||
|
@ -393,13 +393,13 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'center': {
|
case 'center': {
|
||||||
return [h('bdi',h('div', {
|
return [h('bdi', h('div', {
|
||||||
style: 'text-align:center;',
|
style: 'text-align:center;',
|
||||||
}, genEl(token.children, scale)))];
|
}, genEl(token.children, scale)))];
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'url': {
|
case 'url': {
|
||||||
return [h('bdi',h(MkUrl, {
|
return [h('bdi', h(MkUrl, {
|
||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
url: token.props.url,
|
url: token.props.url,
|
||||||
rel: 'nofollow noopener',
|
rel: 'nofollow noopener',
|
||||||
|
@ -407,7 +407,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'link': {
|
case 'link': {
|
||||||
return [h('bdi',h(MkLink, {
|
return [h('bdi', h(MkLink, {
|
||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
url: token.props.url,
|
url: token.props.url,
|
||||||
rel: 'nofollow noopener',
|
rel: 'nofollow noopener',
|
||||||
|
@ -415,7 +415,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'mention': {
|
case 'mention': {
|
||||||
return [h('bdi',h(MkMention, {
|
return [h('bdi', h(MkMention, {
|
||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
host: (token.props.host == null && props.author && props.author.host != null ? props.author.host : token.props.host) ?? host,
|
host: (token.props.host == null && props.author && props.author.host != null ? props.author.host : token.props.host) ?? host,
|
||||||
username: token.props.username,
|
username: token.props.username,
|
||||||
|
@ -423,7 +423,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'hashtag': {
|
case 'hashtag': {
|
||||||
return [h('bdi',h(MkA, {
|
return [h('bdi', h(MkA, {
|
||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
to: isNote ? `/tags/${encodeURIComponent(token.props.hashtag)}` : `/user-tags/${encodeURIComponent(token.props.hashtag)}`,
|
to: isNote ? `/tags/${encodeURIComponent(token.props.hashtag)}` : `/user-tags/${encodeURIComponent(token.props.hashtag)}`,
|
||||||
style: 'color:var(--hashtag);',
|
style: 'color:var(--hashtag);',
|
||||||
|
@ -431,7 +431,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'blockCode': {
|
case 'blockCode': {
|
||||||
return [h('bdi',h(MkCode, {
|
return [h('bdi', h(MkCode, {
|
||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
code: token.props.code,
|
code: token.props.code,
|
||||||
lang: token.props.lang ?? undefined,
|
lang: token.props.lang ?? undefined,
|
||||||
|
@ -439,7 +439,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'inlineCode': {
|
case 'inlineCode': {
|
||||||
return [h('bdi',h(MkCodeInline, {
|
return [h('bdi', h(MkCodeInline, {
|
||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
code: token.props.code,
|
code: token.props.code,
|
||||||
}))];
|
}))];
|
||||||
|
@ -447,11 +447,11 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||||
|
|
||||||
case 'quote': {
|
case 'quote': {
|
||||||
if (!props.nowrap) {
|
if (!props.nowrap) {
|
||||||
return [h('bdi',h('div', {
|
return [h('bdi', h('div', {
|
||||||
style: QUOTE_STYLE,
|
style: QUOTE_STYLE,
|
||||||
}, genEl(token.children, scale, true)))];
|
}, genEl(token.children, scale, true)))];
|
||||||
} else {
|
} else {
|
||||||
return [h('bdi',h('span', {
|
return [h('bdi', h('span', {
|
||||||
style: QUOTE_STYLE,
|
style: QUOTE_STYLE,
|
||||||
}, genEl(token.children, scale, true)))];
|
}, genEl(token.children, scale, true)))];
|
||||||
}
|
}
|
||||||
|
@ -497,14 +497,14 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'mathInline': {
|
case 'mathInline': {
|
||||||
return [h('bdi',h(MkFormula, {
|
return [h('bdi', h(MkFormula, {
|
||||||
formula: token.props.formula,
|
formula: token.props.formula,
|
||||||
block: false,
|
block: false,
|
||||||
}))];
|
}))];
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'mathBlock': {
|
case 'mathBlock': {
|
||||||
return [h('bdi',h(MkFormula, {
|
return [h('bdi', h(MkFormula, {
|
||||||
formula: token.props.formula,
|
formula: token.props.formula,
|
||||||
block: true,
|
block: true,
|
||||||
}))];
|
}))];
|
||||||
|
|
Loading…
Reference in New Issue