Commits

shl...@iglu.org.il@cec68495-dca5-4e2b-845c-11fdaaa4f967  committed 4e5b869

Correct the scripts.

  • Participants
  • Parent commits 34c0e6d

Comments (0)

Files changed (2)

File bin/find_ascii_quotes-xmlp.pl

                 {
                     my $l = $lines[$idx];
 
-                    if ($l =~ m{"})
+                    if ($l =~ m{["']})
                     {
                         printf {*STDOUT}
                         (

File bin/find_ascii_quotes.rb

-require 'rubygems'
-require 'nokogiri'
+    require 'rubygems'
+    require 'nokogiri'
 
-ARGV.each do |filename|
-    xml_stream = File.open(filename)
-    reader = Nokogiri::XML::Reader(xml_stream)
-    titles = []
-    text = ''
-    grab_text = false
-    reader.each do |elem|
-        if elem.node_type == Nokogiri::XML::Node::TEXT_NODE
-            data = elem.value
-            lines = data.split(/\n/, -1);
-            
-            lines.each_with_index do |line, idx|
-                if (line =~ /"/) then
-                    STDOUT.printf "%s:%d:%s\n", filename, elem.line()+idx, line
+    ARGV.each do |filename|
+        xml_stream = File.open(filename)
+        reader = Nokogiri::XML::Reader(xml_stream)
+        titles = []
+        text = ''
+        grab_text = false
+        reader.each do |elem|
+            if elem.node_type == Nokogiri::XML::Node::TEXT_NODE
+                data = elem.value
+                lines = data.split(/\n/, -1);
+                
+                lines.each_with_index do |line, idx|
+                    if (line =~ /"/) then
+                        STDOUT.printf "%s:%d:%s\n", filename, elem.line()+idx, line
+                    end
                 end
             end
         end
     end
-end