Skip to content
This repository has been archived by the owner on Dec 28, 2024. It is now read-only.

Pattern should match on word boundary #4

Open
Cheatoid opened this issue Mar 20, 2022 · 1 comment
Open

Pattern should match on word boundary #4

Cheatoid opened this issue Mar 20, 2022 · 1 comment

Comments

@Cheatoid
Copy link

This should not match:

do_not_require "lib"

Yet it does.

@Le0Developer
Copy link
Owner

This is intended, because you might write a wrapper around require and still want to include it.

eg:

function safe_require(module)
  local ok, err = pcall(require, module)
  if ok then return err end
  -- custom error handler etc
end

safe_require("test")  -- still includes it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants