Land #9398, allow UTF-8 module names and authors

4.x
Brent Cook 2018-01-22 16:41:30 -06:00 committed by Jeffrey Martin
parent ab610f599b
commit 5fc1988d63
No known key found for this signature in database
GPG Key ID: 0CD9BBC2AF15F171
1 changed files with 0 additions and 16 deletions

View File

@ -34,10 +34,6 @@ class String
def cyan
"\e[1;36;40m#{self}\e[0m"
end
def ascii_only?
self =~ Regexp.new('[\x00-\x08\x0b\x0c\x0e-\x19\x7f-\xff]', nil, 'n') ? false : true
end
end
class Msftidy
@ -318,10 +314,6 @@ class Msftidy
end
end
if not mod_title.ascii_only?
error("Please avoid unicode or non-printable characters in module title.")
end
# Since we're looking at the module title, this line clearly cannot be
# the author block, so no point to run more code below.
next
@ -355,10 +347,6 @@ class Msftidy
error("No Twitter handles, please. Try leaving it in a comment instead.")
end
if not author_name.ascii_only?
error("Please avoid unicode or non-printable characters in Author")
end
unless author_name.empty?
author_open_brackets = author_name.scan('<').size
author_close_brackets = author_name.scan('>').size
@ -541,10 +529,6 @@ class Msftidy
src_ended = true if ln =~ /^__END__$/
next if src_ended
if ln =~ /[\x00-\x08\x0b\x0c\x0e-\x19\x7f-\xff]/
error("Unicode detected: #{ln.inspect}", idx)
end
if ln =~ /[ \t]$/
warn("Spaces at EOL", idx)
end