Skip to content

Commit 7d76da7

Browse files
content: Error message for unexpected CSS class in vlist inner span
1 parent 2c5a28c commit 7d76da7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/model/katex.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,17 @@ class _KatexParser {
195195
for (final innerSpan in vlist.nodes) {
196196
if (innerSpan case dom.Element(
197197
localName: 'span',
198-
className: '',
199198
nodes: [
200199
dom.Element(localName: 'span', className: 'pstrut') &&
201200
final pstrutSpan,
202201
...final otherSpans,
203202
],
204203
)) {
204+
if (innerSpan.className != '') {
205+
throw KatexHtmlParseError('unexpected CSS class for '
206+
'vlist inner span: ${innerSpan.className}');
207+
}
208+
205209
var styles = _parseSpanInlineStyles(innerSpan)!;
206210
final topEm = styles.topEm ?? 0;
207211

0 commit comments

Comments
 (0)