mirror of
https://github.com/thewesker/iron_ebooks.git
synced 2025-12-19 20:01:10 -05:00
Ooops, slight mistake on the contraction handling
This commit is contained in:
@@ -58,7 +58,7 @@ private
|
||||
CONTRACTIONS.each do |c|
|
||||
str.gsub!(/#{c}/i) {|m| m.gsub("'", CONTRACTION_APOSTROPHE_SUBSTITUTE)}
|
||||
end
|
||||
str.gsub!(/'s/, CONTRACTION_APOSTROPHE_SUBSTITUTE)
|
||||
str.gsub!(/'s/, "#{CONTRACTION_APOSTROPHE_SUBSTITUTE}s")
|
||||
|
||||
#puts str
|
||||
words = str.scan(/[\p{Word}'’\-]+/)
|
||||
|
||||
Reference in New Issue
Block a user