Skip to content

Option to set flags for ecma regex engine #1439

@oiiiiiiii

Description

@oiiiiiiii

Currently I don't think there are option to set flags (for example the "u" or "v" flag) for the ecma jsregexp engine. I managed to get the u flag working be hardcoding it, for some strange reason the v flag did not work properly (replacing the empty string with the flag in the call):

/lua/luasnip/nodes/util/trig_engines.lua line 78

		local trig_compiled, err_maybe = jsregexp_compile_safe(trig .. "$", "u")

Would it be possible to create an option in luasnip.setup for it to set it manually? If tell me where you want the option to be I can also create a PR, I just don't want to make it "wrong" so it gets thrown away.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions