diff --git a/packages/myst-parser/tests/roles/si.yml b/packages/myst-parser/tests/roles/si.yml index 606123195..7e5e84a48 100644 --- a/packages/myst-parser/tests/roles/si.yml +++ b/packages/myst-parser/tests/roles/si.yml @@ -33,7 +33,6 @@ cases: units: [hertz] value: 100 Hz - - title: decimal number parses markdown: '{si}`1.345e10 <\hertz>`' mdast: @@ -50,4 +49,4 @@ cases: number: '1.345e10' unit: Hz units: [hertz] - value: 1.345e10 Hz \ No newline at end of file + value: 1.345e10 Hz diff --git a/packages/myst-roles/src/si.ts b/packages/myst-roles/src/si.ts index f15b35933..eaf4ca212 100644 --- a/packages/myst-roles/src/si.ts +++ b/packages/myst-roles/src/si.ts @@ -14,7 +14,7 @@ export const siRole: RoleSpec = { return [{ type: 'si', error: true, value }]; } const number = match[1]; - const commands = match[match.length-1]; + const commands = match[match.length - 1]; const parsed = [...commands.matchAll(/\\([a-zA-Z]+)/g)]; const units = parsed.filter((c) => !!c).map(([, c]) => c); const translated = units.map((c) => UNITS[c] ?? c);