Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
efd3def461
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue