Fixed chunk mask to handle negative object_id values [Venkat]
This commit is contained in:
parent
4c14f07100
commit
4a8d6eefe0
3 changed files with 7 additions and 4 deletions
|
@ -28,7 +28,7 @@ module Chunk
|
||||||
# a regexp that matches all chunk_types masks
|
# a regexp that matches all chunk_types masks
|
||||||
def Abstract::mask_re(chunk_types)
|
def Abstract::mask_re(chunk_types)
|
||||||
chunk_classes = chunk_types.map{|klass| klass.mask_string}.join("|")
|
chunk_classes = chunk_types.map{|klass| klass.mask_string}.join("|")
|
||||||
/chunk(\d+)(#{chunk_classes})chunk/
|
/chunk(-?\d+)(#{chunk_classes})chunk/
|
||||||
end
|
end
|
||||||
|
|
||||||
attr_reader :text, :unmask_text, :unmask_mode
|
attr_reader :text, :unmask_text, :unmask_mode
|
||||||
|
|
|
@ -30,8 +30,11 @@ class Include < WikiChunk::WikiReference
|
||||||
return "<em>Recursive include detected; #{@page_name} --> #{@content.page_name} " +
|
return "<em>Recursive include detected; #{@page_name} --> #{@content.page_name} " +
|
||||||
"--> #{@page_name}</em>\n"
|
"--> #{@page_name}</em>\n"
|
||||||
else
|
else
|
||||||
@content.merge_chunks(renderer.display_content)
|
require 'breakpoint'
|
||||||
return renderer.display_content.pre_rendered
|
breakpoint
|
||||||
|
included_content = renderer.display_content
|
||||||
|
@content.merge_chunks(included_content)
|
||||||
|
return included_content.pre_rendered
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return "<em>Could not include #{@page_name}</em>\n"
|
return "<em>Could not include #{@page_name}</em>\n"
|
||||||
|
|
|
@ -202,4 +202,4 @@ task :migrate => :environment do
|
||||||
end
|
end
|
||||||
|
|
||||||
task :ft => :test_functional
|
task :ft => :test_functional
|
||||||
task :ut => :test_unit
|
task :ut => :test_units
|
Loading…
Reference in a new issue