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

This commit is contained in:
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 'chunks/chunk'
require 'stringsupport'
# Contains all the methods for finding and replacing wiki related links. # Contains all the methods for finding and replacing wiki related links.
module WikiChunk module WikiChunk
@ -33,7 +34,7 @@ module WikiChunk
end end
def self.apply_to(content) 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) chunk = self.new($~, content)
if chunk.textile_url? if chunk.textile_url?
# do not substitute # do not substitute

View file

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