aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3dv/spell.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2012-01-23 21:52:37 -0500
committerRalph Amissah <ralph@amissah.com>2012-01-23 21:52:37 -0500
commitdc5c01b1033cfc9e09fd4fc29666e826e67cd7bb (patch)
treee53a389c4f669d79b5b82ce6fd1853da6b25f85d /lib/sisu/v3dv/spell.rb
parentdebian/changelog (3.1.11-1) (diff)
parentv3dv: replace use of most ruby exclamation (!) method actions (diff)
Merge commit 'sisu_3.1.12' into debian/sid
Diffstat (limited to 'lib/sisu/v3dv/spell.rb')
-rw-r--r--lib/sisu/v3dv/spell.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/sisu/v3dv/spell.rb b/lib/sisu/v3dv/spell.rb
index 1a8dc35b..58b86af3 100644
--- a/lib/sisu/v3dv/spell.rb
+++ b/lib/sisu/v3dv/spell.rb
@@ -70,23 +70,23 @@ module SiSU_SpellUtility
end
def check
@input.each do |data|
- data.gsub!(/(https?|www|ftp|gopher|png|jpg|gif|html|htm)\S+/i,' ')
- data.gsub!(/(&nbsp;|#{Mx[:nbsp]})/i,' ')
- data.gsub!(/<\/?(table|tr|td|b|p|href).*?>/i,' ')
- data.gsub!(/(<==.+|<:\S+>|<!.+?!>|^@\S+?:.+|\{\{\{|~)/,' ')
- data.gsub!(/(["|<>)(\n'`'.;&_-]|\=)/,' ')
- data.gsub!(/\b(altExternal|
- target|externalimg|
- srcimagebext|
- img|src|toc|pdf|
- cd|org|
- helvetica|roman
- )\b/i,' ')
- data.gsub!(/EOF/,'')
+ data=data.gsub(/(https?|www|ftp|gopher|png|jpg|gif|html|htm)\S+/i,' ').
+ gsub(/(&nbsp;|#{Mx[:nbsp]})/i,' ').
+ gsub(/<\/?(table|tr|td|b|p|href).*?>/i,' ').
+ gsub(/(<==.+|<:\S+>|<!.+?!>|^@\S+?:.+|\{\{\{|~)/,' ').
+ gsub(/(["|<>)(\n'`'.;&_-]|\=)/,' ').
+ gsub(/\b(altExternal|
+ target|externalimg|
+ srcimagebext|
+ img|src|toc|pdf|
+ cd|org|
+ helvetica|roman
+ )\b/i,' ').
+ gsub(/EOF/,'')
@words=data.scan(/\S+/)
@words.each { |y| @allwords << y }
end
- @allwords.uniq!
+ @allwords=@allwords.uniq
if @flg =~ /S/
File.open('/home/ralph/spell_error','a+') do |file| #fix
file.puts %{\n\n<<#{@filename}>>}