Skip to content

Commit

Permalink
chore: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Jan 10, 2024
1 parent 628aba6 commit 0568e12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/myst-parser/tests/roles/si.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ cases:
units: [hertz]
value: 100 Hz


- title: decimal number parses
markdown: '{si}`1.345e10 <\hertz>`'
mdast:
Expand All @@ -50,4 +49,4 @@ cases:
number: '1.345e10'
unit: Hz
units: [hertz]
value: 1.345e10 Hz
value: 1.345e10 Hz
2 changes: 1 addition & 1 deletion packages/myst-roles/src/si.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0568e12

Please sign in to comment.