mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-13 21:40:45 +01:00
fix nyaize line
This commit is contained in:
parent
4281f08a75
commit
49eb673c40
1 changed files with 1 additions and 4 deletions
|
@ -58,8 +58,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
|||
provide('linkNavigationBehavior', props.linkNavigationBehavior);
|
||||
|
||||
const isNote = props.isNote ?? true;
|
||||
const shouldNyaize = props.nyaize ? props.nyaize === 'respect' ? props.author?.isCat ? props.author.speakAsCat : false : false : false;
|
||||
|
||||
const shouldNyaize = props.nyaize === 'respect' && props.author?.speakAsCat && !defaultStore.state.disableCatSpeak;
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||
if (props.text == null || props.text === '') return;
|
||||
|
||||
|
@ -89,8 +88,6 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
|||
* @param disableNyaize Whether nyaize is disabled or not
|
||||
*/
|
||||
const genEl = (ast: mfm.MfmNode[], scale: number, disableNyaize = false) => ast.map((token): VNode | string | (VNode | string)[] => {
|
||||
if (defaultStore.state.disableCatSpeak)
|
||||
disableNyaize = true
|
||||
switch (token.type) {
|
||||
case 'text': {
|
||||
let text = token.props.text.replace(/(\r\n|\n|\r)/g, '\n');
|
||||
|
|
Loading…
Reference in a new issue