Included pages

Redirects and categories of included
pages should not be inherited.
(Suggestion of Andrew Stacey)
This commit is contained in:
Jacques Distler 2010-10-21 23:58:04 -05:00
parent bf69cceb25
commit bb17fbbe02
3 changed files with 42 additions and 2 deletions

View file

@ -36,7 +36,8 @@ class Include < WikiChunk::WikiReference
else
raise "Unsupported rendering mode #{@mode.inspect}"
end
@content.merge_chunks(included_content)
# redirects and categories of included pages should not be inherited
@content.merge_chunks(included_content.delete_chunks!([Redirect, Category]))
clear_include_list
return included_content.pre_rendered
else