get some fresh air

This commit is contained in:
Loic Nageleisen 2015-05-24 15:55:24 +02:00
parent a32c04e898
commit cb2d79a1e3

View file

@ -52,13 +52,16 @@ class Command
# Command line parsing (mostly) following the rules at # Command line parsing (mostly) following the rules at
# http://pubs.opengroup.org/onlinepubs/9699919799/utilities # http://pubs.opengroup.org/onlinepubs/9699919799/utilities
# /ex.html#tag_20_40_13_03 # /ex.html#tag_20_40_13_03
# Steps 1/2: Leading blanks and colons are ignored. # Steps 1/2: Leading blanks and colons are ignored.
cl = input.characters cl = input.characters
cl = cl.replace(/^(:|\s)*/, '') cl = cl.replace(/^(:|\s)*/, '')
return unless cl.length > 0 return unless cl.length > 0
# Step 3: If the first character is a ", ignore the rest of the line # Step 3: If the first character is a ", ignore the rest of the line
if cl[0] is '"' if cl[0] is '"'
return return
# Step 4: Address parsing # Step 4: Address parsing
lastLine = @editor.getBuffer().lines.length - 1 lastLine = @editor.getBuffer().lines.length - 1
if cl[0] is '%' if cl[0] is '%'