Debian Codegraph @

vendor/wikimedia/parsoid/src/Wt2Html/TT/ListFrame.php

raw
1 <?php
2 declare( strict_types = 1 );
3
4 namespace Wikimedia\Parsoid\Wt2Html\TT;
5
6 use Wikimedia\Parsoid\Tokens\EndTagTk;
7 use Wikimedia\Parsoid\Tokens\NlTk;
8
9 /**
10 * Private helper class for ListHandler.
11 * @private
12 */
13 class ListFrame {
14 /**
15 * Flag indicating a list-less line that terminates a list block
16 */
17 public bool $atEOL = true;
18 /**
19 * NlTk that triggered atEOL
20 */
21 public ?NlTk $nlTk = null;
22 public array $solTokens = [];
23 /**
24 * Bullet stack, previous element's listStyle
25 */
26 public array $bstack = [];
27 /**
28 * Stack of end tags
29 * @var array<EndTagTk>
30 */
31 public array $endtags = [];
32 /**
33 * Partial DOM building heuristic:
34 * Number of open block tags encountered within list context.
35 */
36 public int $numOpenBlockTags = 0;
37 /**
38 * Number of open tags encountered within list context.
39 */
40 public int $numOpenTags = 0;
41
42 /**
43 * Did we generate a <dd> already on this line?
44 * Used to convert extra : listitems to ":" instead of extra <dl>s.
45 * Gets reset on encountering a NlTk or a ; listitem.
46 */
47 public bool $haveDD = false;
48 }