Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki

master
Jacques Distler 2009-12-08 11:49:17 -06:00
commit efd3def461
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,5 @@
require 'chunks/chunk'
require 'stringsupport'
# Contains all the methods for finding and replacing wiki related links.
module WikiChunk
@ -33,7 +34,7 @@ module WikiChunk
end
def self.apply_to(content)
content.gsub!( self.pattern ) do |matched_text|
content.as_utf8.gsub!( self.pattern ) do |matched_text|
chunk = self.new($~, content)
if chunk.textile_url?
# do not substitute

View File

@ -190,7 +190,7 @@ class WikiContent < String
def render!
pre_render!
@options[:engine].apply_to(self)
as_bytes
as_utf8
# unmask in one go. $~[1] is the chunk id
gsub!(MASK_RE[ACTIVE_CHUNKS]) do
chunk = @chunks_by_id[$~[1].to_i]
@ -202,7 +202,6 @@ class WikiContent < String
chunk.unmask_text
end
end
as_utf8
self.replace xhtml_sanitize(self)
end