Skip to content

Commit 403534a

Browse files
committed
Merge branch 'master' of https://github.com/arnog/mathlive
2 parents 352ae19 + 115698e commit 403534a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/formats/atom-to-speakable-text.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,11 @@ function atomToSpeakableFragment(
500500
// Workaround: if the macro is expand = true, speak the atom body, otherwise speak the macro name
501501
const macroName = command.replace(/^\\/g, '');
502502
const macro = getMacros()[macroName];
503-
if (macro) {
504-
if (macro?.expand) result += atomToSpeakableFragment('math', atom.body);
505-
else result += `${macroName} `;
503+
if (macro?.expand) {
504+
result += atomToSpeakableFragment('math', atom.body);
505+
}
506+
else {
507+
result += `${macroName} `;
506508
}
507509
break;
508510
case 'placeholder':

0 commit comments

Comments
 (0)