Enhance(frontend): Allow negative delay in MFM (#14200)

Co-authored-by: easrng <me@easrng.net>
This commit is contained in:
easrng
2024-07-14 06:31:30 -06:00
committed by GitHub
parent f0b9d70720
commit 16795f18a7
2 changed files with 2 additions and 1 deletions

View File

@@ -65,7 +65,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
const validTime = (t: string | boolean | null | undefined) => {
if (t == null) return null;
if (typeof t === 'boolean') return null;
return t.match(/^[0-9.]+s$/) ? t : null;
return t.match(/^\-?[0-9.]+s$/) ? t : null;
};
const validColor = (c: unknown): string | null => {