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

This commit is contained in:
Jacques Distler 2009-12-18 23:57:05 -06:00
commit 67b27da5c9
2 changed files with 4 additions and 2 deletions

View file

@ -11,7 +11,7 @@ module Chunk
# Rails's default utf-8 support causes problems here. So, for Chunk::Abstract class, turn off
# multibyte character support.
$KCODE = 'n'
$KCODE = 'n' unless ''.respond_to?(:force_encoding)
# automatically construct the array of derivatives of Chunk::Abstract
@derivatives = []

View file

@ -71,7 +71,9 @@ module WikiChunk
attr_reader :escaped_text
unless defined? WIKI_WORD
WIKI_WORD = Regexp.new('(":)?(\\\\)?(' + WikiWords::WIKI_WORD_PATTERN + ')\b', 0, 'u')
WIKI_WORD = ''.respond_to?(:force_encoding) ?
Regexp.new('(":)?(\\\\)?(' + WikiWords::WIKI_WORD_PATTERN + ')\b', 0) :
Regexp.new('(":)?(\\\\)?(' + WikiWords::WIKI_WORD_PATTERN + ')\b', 0, 'u')
end
def self.pattern