You can now disable cat speak in settings (client side)

This commit is contained in:
Leah 2024-08-26 20:27:08 +02:00 committed by dakkar
parent bc8c6592ea
commit d55c86548d
6 changed files with 15 additions and 1 deletions

View file

@ -89,6 +89,8 @@ 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');