Edgewall Software
Modify

Opened 14 years ago

Closed 13 years ago

#3089 closed defect (fixed)

PageOutline macro in wiki preview still shows the outline of the last saved content

Reported by: dave@… Owned by: Christian Boos
Priority: high Milestone: 0.11
Component: wiki system Version: 0.9.5
Severity: normal Keywords: macro
Cc: Branch:
Release Notes:
API Changes:

Description

Top Heading

Second Level Heading

Second Level Heading 2

It's not 100% clear what it's supposed to be doing, since documentation is rather sparse… but on my page containing one top-level heading and several second-level headings, as in the source of this ticket (go to edit this item), PageOutline gives me a page outline containing just a single entry, for the top-level heading.

Attachments (0)

Change History (4)

comment:1 by anonymous, 14 years ago

Actually it works once you confirm, but it's broken in Preview. I think in the Preview, the index is still looking at the last page saved.

comment:2 by Christian Boos, 14 years ago

Keywords: macro added
Milestone: 0.10
Owner: changed from Jonas Borgström to Christian Boos
Summary: PageOutline Macro shows only one levelPageOutline macro in wiki preview still shows the outline of the last saved content

This could only be fixed by making available the full content of the currently rendered wiki text to the render_macro().

That would have the additional benefit of making the outline work on any kind of content, not only wiki pages.

Actually, this can be achieved by passing the formatter object to the macro, which is a useful thing to do anyway (see Trac-Dev:497).

comment:3 by Christian Boos, 14 years ago

Milestone: 0.100.11

As the above solution will implies some changes to the IWikiMacroRenderer interface, I'll do that in the next development cycle.

comment:4 by Christian Boos, 13 years ago

Resolution: fixed
Status: newclosed

This specific problem was fixed in r4452 by simply storing the text being formatted in the current formatter, so that macros (which now have access to the formatter) can also use this text for other purposes, like in this case, generating an outline of it.

In the future, the same effect could be achieved more efficiently by first parsing the text to be formatted, then making the whole Wiki-DOM tree (see #4431) available to the macros when rendering the tree, such that, in this case, the heading nodes could be extracted.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.