Skip to content

Commit

Permalink
Fix issue when file name prefix is numeric , fixes #240 and #271
Browse files Browse the repository at this point in the history
  • Loading branch information
edubart committed Sep 22, 2024
1 parent 38c2d9c commit 0d8eaf4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lualib/nelua/utils/pegger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@ function pegger.split_execargs(s)
end

local filename_to_unitname_patt = re.compile[[
p <- {~ filebeg? c* ~}
p <- {~ filebeg? numprefix? c* ~}
c <- extend -> '' / [_%w] / (%s+ / [_/\.-]) -> '_' / . -> 'X'
filebeg <- [./\]+ -> ''
numprefix <- '' -> 'n' [0-9]+
extend <- '.' [_%w]+ !.
]]

Expand Down

0 comments on commit 0d8eaf4

Please sign in to comment.