Update MkMisskeyFlavoredMarkdown.ts

This commit is contained in:
かっこかり 2023-10-27 14:37:06 +09:00 committed by GitHub
parent 1d9b5ae1ba
commit cf6473e1ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -37,6 +37,7 @@ export default function(props: {
isNote?: boolean;
emojiUrls?: string[];
rootScale?: number;
enableNyaize?: boolean | 'account';
}) {
const isNote = props.isNote !== undefined ? props.isNote : true;
@ -60,7 +61,7 @@ export default function(props: {
switch (token.type) {
case 'text': {
let text = token.props.text.replace(/(\r\n|\n|\r)/g, '\n');
if (!disableNyaize && props.author?.isCat) {
if (!disableNyaize && (props.enableNyaize === true || (props.enableNyaize === 'account' && props.author?.isCat))) {
text = nyaize(text);
}