Mercurial > moin > 1.9
changeset 4069:b1a690282f20
TableOfContents: show correct TOC for editor preview
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Sun, 07 Sep 2008 14:16:43 +0200 |
parents | 38e9b3922748 |
children | 65bf5767d8ad |
files | MoinMoin/macro/TableOfContents.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/macro/TableOfContents.py Thu Sep 04 23:46:08 2008 +0200 +++ b/MoinMoin/macro/TableOfContents.py Sun Sep 07 14:16:43 2008 +0200 @@ -149,6 +149,11 @@ tocfm = TOCFormatter(macro.request) p = Page(macro.request, pname, formatter=tocfm, rev=macro.request.rev) + + # this is so we get a correctly updated TOC if we just preview in the editor - + # the new content is not stored on disk yet, but available as macro.parser.raw: + p.set_raw_body(macro.parser.raw, modified=1) + output = macro.request.redirectedOutput(p.send_page, content_only=True, count_hit=False,