Page MenuHomePhabricator

<pages> and odd behaviour of fromsection and tosection
Closed, ResolvedPublic

Description

Author: beau

Description:
Let's assume I have two pages. A page "1" with sections: A, B, C; and a page "2" with sections: D, E, F.

The tag <pages from="1" fromsection="B" to="2" tosecton="E" /> will show sections B and E. But it should show the text _between_ <section start="B"/> and <section end="E"/> - sections B, C, D, E.

In the source code I have found the extension is using {{#lst}} (the documentation says nothing about that), which allow multiple sections transclusion.

<pages from="1" fromsection="B|C" to="2" tosecton="D|E" />

Above example will do what I want, but it seems hackish - it is neither intuitive nor documented.


Version: unspecified
Severity: normal

Details

Reference
bz23049

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:08 PM
bzimport added a project: ProofreadPage.
bzimport set Reference to bz23049.

beau wrote:

A patch fixing fromsection

I have created a patch, which changes the code of pr_renderPages function a bit.

The patch should fix an issue with 'fromsection'. Fixing 'tosection' depends on bug #23407.

attachment pages-fromsection.patch ignored as obsolete

beau wrote:

Updated version that applies to r93993

I have created an updated patch, that fixes fromsection and tosection behaviour.

Attached:

john wrote:

Applied in r95338 with minor change ( != should be !== )