Skip to content

Commit 2b39409

Browse files
committed
katex [nfc]: Rename a local to hasVlistT2
This reflects the condition that's directly encoded by this boolean. (Through several conditionals in the rest of the function, we end up confirming that this value is true just if the element does in fact have two `.vlist-r` children, as the old name suggests. But that comes later and more indirectly.)
1 parent ff6dc79 commit 2b39409

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/model/katex.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,9 @@ class _KatexParser {
258258
if (vlistT.nodes.isEmpty) throw _KatexHtmlParseError();
259259
if (vlistT.attributes.containsKey('style')) throw _KatexHtmlParseError();
260260

261-
final hasTwoVlistR = vlistT.className == 'vlist-t vlist-t2';
262-
if (!hasTwoVlistR && vlistT.nodes.length != 1) throw _KatexHtmlParseError();
263-
264-
if (hasTwoVlistR) {
261+
final hasVlistT2 = vlistT.className == 'vlist-t vlist-t2';
262+
if (!hasVlistT2 && vlistT.nodes.length != 1) throw _KatexHtmlParseError();
263+
if (hasVlistT2) {
265264
if (vlistT.nodes case [
266265
_,
267266
dom.Element(localName: 'span', className: 'vlist-r', nodes: [

0 commit comments

Comments
 (0)