app/models/chunks/include.rb in instiki-0.10.1 vs app/models/chunks/include.rb in instiki-0.10.2

- old
+ new

@@ -7,11 +7,11 @@ # of changes to that page. # If the included page could not be found, a warning is displayed. class Include < WikiChunk::WikiReference - INCLUDE_PATTERN = /\[\[!include(.*)\]\]\s*/i + INCLUDE_PATTERN = /\[\[!include\s+(.*?)\]\]\s*/i def self.pattern() INCLUDE_PATTERN end def initialize(match_data, content) super @@ -21,13 +21,13 @@ private def get_unmask_text_avoiding_recursion_loops if refpage then + refpage.clear_display_cache if refpage.wiki_includes.include?(@content.page_name) # this will break the recursion @content.delete_chunk(self) - refpage.clear_display_cache return "<em>Recursive include detected; #{@page_name} --> #{@content.page_name} " + "--> #{@page_name}</em>\n" else @content.merge_chunks(refpage.display_content) return refpage.display_content.pre_rendered