Fixed chunk mask to handle negative object_id values [Venkat]

This commit is contained in:
Alexey Verkhovsky 2005-09-14 02:01:20 +00:00
parent 4c14f07100
commit 4a8d6eefe0
3 changed files with 7 additions and 4 deletions

View file

@ -28,7 +28,7 @@ module Chunk
# a regexp that matches all chunk_types masks
def Abstract::mask_re(chunk_types)
chunk_classes = chunk_types.map{|klass| klass.mask_string}.join("|")
/chunk(\d+)(#{chunk_classes})chunk/
/chunk(-?\d+)(#{chunk_classes})chunk/
end
attr_reader :text, :unmask_text, :unmask_mode

View file

@ -30,8 +30,11 @@ class Include < WikiChunk::WikiReference
return "<em>Recursive include detected; #{@page_name} --> #{@content.page_name} " +
"--> #{@page_name}</em>\n"
else
@content.merge_chunks(renderer.display_content)
return renderer.display_content.pre_rendered
require 'breakpoint'
breakpoint
included_content = renderer.display_content
@content.merge_chunks(included_content)
return included_content.pre_rendered
end
else
return "<em>Could not include #{@page_name}</em>\n"

View file

@ -202,4 +202,4 @@ task :migrate => :environment do
end
task :ft => :test_functional
task :ut => :test_unit
task :ut => :test_units