Page MenuHomePhabricator

Ignore content within <noinclude> tags
Closed, ResolvedPublic

Description

When transcluding a section with the #lsth parser function, the content within <noinclude> tags is transcluded too.

Demo:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 2 2017, 5:42 PM

Do you have an example link handy?

Sophivorus updated the task description. (Show Details)Mar 2 2017, 8:35 PM

@Aklapper Sure, I have updated the description with a link to a demo

Sophivorus triaged this task as Normal priority.Aug 3 2017, 10:32 AM

Solving this task would allow us to do cleaner transclusions. For example, when I want to transclude the introduction of an article in a portal, I would like to use {{#lsth}} However, if the introduction contains leading templates that I don't want to transclude, I'm forced to wrap the content that I do want to transclude with <section> tags and use {{#lst}} instead. If the content within <noinclude> were ignored as it should, I could just wrap the templates with <noinclude> tags and transclude the full intro with {{#lsth}}, which would be cleaner and simpler.

Change 378817 had a related patch set uploaded (by Legoktm; owner: Sophivorus):
[mediawiki/extensions/LabeledSectionTransclusion@master] Don't transclude content within <noinclude> tags

https://gerrit.wikimedia.org/r/378817

Sophivorus added a subscriber: Tpt.Oct 6 2017, 1:30 PM

@Tpt Hi, sorry to insist, but I'm not sure if you've forgotten about this task and fixing it would really help me continue my work on Wikipedia efficiently. I think the latest patch is super easy to review and I even created a parser test. If you're not too busy, could you take a look? Thanks !

Change 378817 merged by jenkins-bot:
[mediawiki/extensions/LabeledSectionTransclusion@master] Don't transclude content within <noinclude> tags

https://gerrit.wikimedia.org/r/378817

Sophivorus closed this task as Resolved.Oct 24 2017, 4:44 PM
Sophivorus claimed this task.