Skip to content

fixed definition list parsing for inline ':' definitions - #160

Open
tacc-tacc wants to merge 8 commits into
5j9:mainfrom
tacc-tacc:main
Open

tacc-tacc wants to merge 8 commits into
5j9:mainfrom
tacc-tacc:main

Conversation

@tacc-tacc

Copy link
Copy Markdown
Contributor

@5j9 What do you think of this?

@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d281474) to head (8a63030).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #160   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           16        16           
  Lines         2442      2459   +17     
=========================================
+ Hits          2442      2459   +17     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

5j9 pushed a commit that referenced this pull request Oct 17, 2026
@tacc-tacc

tacc-tacc commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

@5j9 Will you merge this PR? I think is ready but you have to review everything. Here's the deal:

  • Rewrote the LIST_PATTERN_FORMAT with sublist patterns: now it processes ;a:b as ;a, :b instead of ;a:b, :b.
  • Also, the sublists must repeat exactly the last pattern so as in :;a::b\n:;c, here :;c is nested in ::b\n and not in :;a. For this, i replaced (?&pattern) with (?P=pattern) so it repeats the captured group exactly. The reason why I enclosed with a new label (pattern_) is to call the spans for the convert method, since bare backreference does not save the spans.
  • I think you should shadow everything before parsing lists, or at least with : lists. I think this should include multiline tables since that is how Parsoid works, as I understand. I shadowed almost everything, but you should review that part, specially because it is not clear to me whether the shadows should be added in get_lists as I did or in lists_shadow_ss method.
  • regarding templates and parser functions, the result depends on the output, but I think it's better to guess that it won't output a : so we can retain the entity as a whole and avoid chopping it while parsing definition lists.

Please, carefully examine the new testcases I added and compare how it behaves this new version with the previous one. I think it is too much important to be ignored.

@tacc-tacc

tacc-tacc commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

@5j9 Can you please answer this thread instead of merging this on the sly? I found by chance your recent edits, but I think my expectation in the testcase for ;;a:1\n;;b:2\n;c:3\n is right: there is one list with three items, not two. Can you try this on en.wikipedia or in a wiki that has enabled Parsoid by default? You might be renderizing with legacy parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant