Sha256: 47f45c7070fc9bcc8f050d0bde97aa51a538b158ad9cfa06f68fd7130b43554d

Contents?: true

Size: 317 Bytes

Versions: 31

Compression:

Stored size: 317 Bytes

Contents

#!/usr/bin/ruby
# frozen_string_literal: true

val = if ARGV[0].nil?
        $stdin.read
      else
        File.read(ARGV.first)
      end

d = (val.gsub(/".*?"/) do |i|
  "“#{i[1..-2]}”"
end).gsub(/\s*”\s*([,.?!])/, '\\1”').gsub(/(\s)\s+/, '\\1')

if ARGV[0].nil?
  print d
else
  File.write ARGV[0], d
end

Version data entries

31 entries across 15 versions & 4 rubygems

Version Path
elonmusk-1.0.77 ./bin/quot
elonmusk-1.0.77 ./non_compiled_programs/quot
ufos-1.0.77 ./bin/quot
ufos-1.0.77 ./non_compiled_programs/quot
aliens-1.0.77 ./non_compiled_programs/quot
aliens-1.0.77 ./bin/quot
freespeech-1.0.77 ./bin/quot
freespeech-1.0.77 ./non_compiled_programs/quot
elonmusk-1.0.72 ./non_compiled_programs/quot
elonmusk-1.0.72 ./bin/quot
ufos-1.0.72 ./bin/quot
ufos-1.0.72 ./non_compiled_programs/quot
aliens-1.0.72 ./non_compiled_programs/quot
aliens-1.0.72 ./bin/quot
freespeech-1.0.72 ./bin/quot
freespeech-1.0.72 ./non_compiled_programs/quot
freespeech-1.0.71 ./bin/quot
freespeech-1.0.71 ./non_compiled_programs/quot
elonmusk-1.0.71 ./non_compiled_programs/quot
elonmusk-1.0.71 ./bin/quot