Permalink
Browse files

textiled_unicode for edge

  • Loading branch information...
1 parent 68b1b12 commit da225b46cdbeff935586eaa2b03686763984eb38 @defunkt committed Jan 5, 2007
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/acts_as_textiled.rb
@@ -10,6 +10,8 @@ def acts_as_textiled(*attrs)
@textiled_attributes = []
def textiled_attributes; Array(@textiled_attributes) end
+ @textiled_unicode = "".respond_to? :chars
+
ruled = Hash === attrs.last ? attrs.pop : {}
attrs += ruled.keys
@@ -57,8 +59,8 @@ def write_attribute(attr_name, value)
def strip_redcloth_html(html)
returning html.dup.gsub(html_regexp, '') do |h|
redcloth_glyphs.each do |(entity, char)|
- sub = [:gsub!, entity, char]
- h.respond_to?(:chars) ? h.chars.send(*sub) : h.send(*sub)
+ sub = [ :gsub!, entity, char ]
+ @textiled_unicode ? h.chars.send(*sub) : h.send(*sub)
end
end
end

0 comments on commit da225b4

Please sign in to comment.