Skip to content

Commit

Permalink
issue #241: little hack to handle no-trailing-comment case
Browse files Browse the repository at this point in the history
  • Loading branch information
stevedonovan committed Apr 1, 2017
1 parent ff65a04 commit fbc2f0b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/pl/lapp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ function lapp.process_options_string(str,args)
if check '-$v{short}, --$o{long} $' or check '-$v{short} $' or check '--$o{long} $' then
if res.long then
optparm = res.long:gsub('[^%w%-]','_') -- I'm not sure the $o pattern will let anything else through?
if #res.rest == 1 then optparm = optparm .. res.rest end
if res.short then aliases[res.short] = optparm end
else
optparm = res.short
Expand Down

0 comments on commit fbc2f0b

Please sign in to comment.