Permalink
Browse files

handle u8232 as newline

  • Loading branch information...
1 parent 3a186fc commit 30bf4fd27ebb0d864b290777ed36b185eeb3d4b8 @dgodd dgodd committed with Feb 28, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/ruby-rtf/parser.rb
View
@@ -180,7 +180,7 @@ def handle_control(name, val, src, current_pos)
val = val % 100
@skip_byte = nil
end
- if val == 32
+ if val == 32 || val == 8232
add_modifier_section({:newline => true}, "\n")
else
val += 65_536 if val < 0
@@ -190,7 +190,6 @@ def handle_control(name, val, src, current_pos)
[val].pack('U*')
end
current_section[:text] << char
- Rails.logger.error [ current_section[:text].encoding , char.encoding ].inspect
end
when *[:rquote, :lquote] then add_modifier_section({name => true}, "'")

0 comments on commit 30bf4fd

Please sign in to comment.