⚓ T203780 Rewrite the section-wrap logic (original) (raw)
Rewrite the section-wrap logic
- Edit Task
- Edit Related Tasks...
- Create Subtask
- Edit Parent Tasks
- Edit Subtasks
- Merge Duplicates In
- Close As Duplicate
- Edit Related Objects...
- Edit Commits
- Edit Mocks
- Mute Notifications
- Protect as security issue
- Award Token
- Flag For Later
The section wrapping is done in Parser.js using the sax events. This has a fundamental disadvantage that you won't know what is the next tag while processing a tag. This has created many issues in the past and the patched up code to do section-wrap is very fragile. There are lot of tracking variables and every now and then we discover we need more contextual information to decide section-wrap.
For example, a template can be multi-part with
Since div is block tag, we will need to wrap
I am proposing to write the section-wrap similar to segment() where we can iterate the linear model of the HTML and full struture of HTML is known.
Event Timeline
santhosh triaged this task as High priority.
Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL · Credits