moonjit / moonjit

Just-In-Time Compiler for the Lua Programming language. Fork of LuaJIT to continue development. This project does not have an active maintainer, see https://twitter.com/siddhesh_p/status/1308594269502885889?s=20 for more detail.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gsub regular expression failure

msg opened this issue · comments

commented

print(string.format('<%s>', (' one two '):gsub('^%s*', '')))

prints:

< one two >

luajit-2.1 and lua5.1 both print:

<one two >

As expected

Is this with moonjit 2.1.x or 2.2? 2.2 is not meant to be compatible with luajit-2.1.

commented

According to @erw7 this is what breaks building of neovim in openSUSE, neovim/neovim#12058

commented

In master, this problem seems to have been fixed by cabe3b3.

Thanks for digging this out @erw7. Closed as duplicate of #86 .