File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -300,8 +300,7 @@ class _KatexParser {
300
300
case 'delimsizing' :
301
301
// .delimsizing { ... }
302
302
if (index + 1 > spanClasses.length) throw KatexHtmlParseError ();
303
- final nextClass = spanClasses[index++ ];
304
- switch (nextClass) {
303
+ switch (spanClasses[index++ ]) {
305
304
case 'size1' :
306
305
styles.fontFamily = 'KaTeX_Size1' ;
307
306
case 'size2' :
@@ -313,24 +312,25 @@ class _KatexParser {
313
312
314
313
case 'mult' :
315
314
// TODO handle nested spans with `.delim-size{1,4}` class.
316
- break ;
317
- }
315
+ throw KatexHtmlParseError ();
318
316
319
- if (styles.fontFamily == null ) throw KatexHtmlParseError ();
317
+ default :
318
+ throw KatexHtmlParseError ();
319
+ }
320
320
321
321
// TODO handle .nulldelimiter and .delimcenter .
322
322
323
323
case 'op-symbol' :
324
324
// .op-symbol { ... }
325
325
if (index + 1 > spanClasses.length) throw KatexHtmlParseError ();
326
- final nextClass = spanClasses[index++ ];
327
- switch (nextClass) {
326
+ switch (spanClasses[index++ ]) {
328
327
case 'small-op' :
329
328
styles.fontFamily = 'KaTeX_Size1' ;
330
329
case 'large-op' :
331
330
styles.fontFamily = 'KaTeX_Size2' ;
331
+ default :
332
+ throw KatexHtmlParseError ();
332
333
}
333
- if (styles.fontFamily == null ) throw KatexHtmlParseError ();
334
334
335
335
// TODO handle more classes from katex.scss
336
336
You can’t perform that action at this time.
0 commit comments