mediawiki-extensions-Discus.../tests/cases/linearWalk/simple.json
Bartosz Dziewoński 8f42c74985 Fix skipping to the end of paragraph, now it considers nested tags
Add yet another tree walking utility: CommentUtils::linearWalk().
Unlike TreeWalker, it allows handling the beginnings and ends of nodes
separately – kind of like parsing a XML token stream, or kind of like
VisualEditor's linear model.

(Add unit tests for this utility. The simple.html test case is copied
from [VisualEditor/VisualEditor]/demos/ve/pages/simple.html.)

Use this utility to stop skipping when we reach either a closing or
opening block node tag. Previously we'd skip over such tags inside
nested "transparent" nodes (like <a>, <del>, or apparently <font>).

Bug: T271385
Change-Id: I201a942eb3a56335e84d94e150ec2c33f8b4f4e0
2021-01-18 18:20:20 +00:00

151 lines
2.7 KiB
JSON

[
"enter #document-fragment(11)",
"enter p(1)",
"enter b(1)",
"enter a(1)",
"enter #text(3)",
"leave #text(3)",
"leave a(1)",
"leave b(1)",
"enter #text(3)",
"leave #text(3)",
"enter a(1)",
"enter #text(3)",
"leave #text(3)",
"leave a(1)",
"enter #text(3)",
"leave #text(3)",
"leave p(1)",
"enter #text(3)",
"leave #text(3)",
"enter h2(1)",
"enter b(1)",
"enter #text(3)",
"leave #text(3)",
"leave b(1)",
"enter #text(3)",
"leave #text(3)",
"enter i(1)",
"enter #text(3)",
"leave #text(3)",
"leave i(1)",
"leave h2(1)",
"enter #text(3)",
"leave #text(3)",
"enter p(1)",
"enter #text(3)",
"leave #text(3)",
"enter a(1)",
"enter #text(3)",
"leave #text(3)",
"leave a(1)",
"enter #text(3)",
"leave #text(3)",
"enter a(1)",
"enter #text(3)",
"leave #text(3)",
"leave a(1)",
"enter #text(3)",
"leave #text(3)",
"leave p(1)",
"enter #text(3)",
"leave #text(3)",
"enter h3(1)",
"enter b(1)",
"enter #text(3)",
"leave #text(3)",
"leave b(1)",
"enter #text(3)",
"leave #text(3)",
"enter i(1)",
"enter #text(3)",
"leave #text(3)",
"leave i(1)",
"leave h3(1)",
"enter #text(3)",
"leave #text(3)",
"enter p(1)",
"enter #text(3)",
"leave #text(3)",
"leave p(1)",
"enter #text(3)",
"leave #text(3)",
"enter h2(1)",
"enter b(1)",
"enter #text(3)",
"leave #text(3)",
"leave b(1)",
"enter #text(3)",
"leave #text(3)",
"enter i(1)",
"enter #text(3)",
"leave #text(3)",
"leave i(1)",
"leave h2(1)",
"enter #text(3)",
"leave #text(3)",
"enter ul(1)",
"enter #text(3)",
"leave #text(3)",
"enter li(1)",
"enter #text(3)",
"leave #text(3)",
"enter p(1)",
"enter b(1)",
"enter #text(3)",
"leave #text(3)",
"leave b(1)",
"leave p(1)",
"enter #text(3)",
"leave #text(3)",
"leave li(1)",
"enter #text(3)",
"leave #text(3)",
"enter li(1)",
"enter #text(3)",
"leave #text(3)",
"enter p(1)",
"enter #text(3)",
"leave #text(3)",
"enter i(1)",
"enter #text(3)",
"leave #text(3)",
"leave i(1)",
"leave p(1)",
"enter #text(3)",
"leave #text(3)",
"leave li(1)",
"enter #text(3)",
"leave #text(3)",
"enter li(1)",
"enter #text(3)",
"leave #text(3)",
"enter p(1)",
"enter #text(3)",
"leave #text(3)",
"enter u(1)",
"enter #text(3)",
"leave #text(3)",
"leave u(1)",
"leave p(1)",
"enter #text(3)",
"leave #text(3)",
"leave li(1)",
"enter #text(3)",
"leave #text(3)",
"leave ul(1)",
"enter #text(3)",
"leave #text(3)",
"enter h2(1)",
"enter #text(3)",
"leave #text(3)",
"leave h2(1)",
"enter #text(3)",
"leave #text(3)",
"enter p(1)",
"enter #text(3)",
"leave #text(3)",
"leave p(1)",
"leave #document-fragment(11)"
]