Included pages
Redirects and categories of included pages should not be inherited. (Suggestion of Andrew Stacey)
This commit is contained in:
parent
bf69cceb25
commit
bb17fbbe02
3 changed files with 42 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue