diff --git a/.travis/before.sh b/.travis/before.sh index d437b43..d307661 100755 --- a/.travis/before.sh +++ b/.travis/before.sh @@ -5,5 +5,4 @@ set -ex luarocks install busted luarocks install cluacov luarocks install lua-cjson $LUA_CJSON -# lua 5.3+ already has utf8 module -luarocks install utf8 || true +luarocks install luautf8 diff --git a/docs/dev/date.md b/docs/dev/date.md index d25402d..2eb940e 100644 --- a/docs/dev/date.md +++ b/docs/dev/date.md @@ -3,4 +3,4 @@ layout: page title: Components › tokenizer --- -Documentation coming soon. See [date.lua](https://github.com/unifire-app/aspect/blob/master/src/aspect/tokenizer.lua) \ No newline at end of file +Documentation coming soon. See [date.lua](https://github.com/unifire-app/aspect/blob/master/src/aspect/date.lua) \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index bdc556a..63932e9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -121,7 +121,7 @@ package.path = '/path/to/aspect/src/?.lua;' .. package.path - [Convention](./dev.md#convention) - [Code of conduct](https://github.com/unifire-app/aspect/blob/master/CODE_OF_CONDUCT.md) - [Debugging](./dev.md#debug) -- Reusable components +- Components - [Tokenizer](./dev/tokenizer.md) - [Date](./dev/date.md) diff --git a/src/aspect/config.lua b/src/aspect/config.lua index 4e411ba..a0052b4 100644 --- a/src/aspect/config.lua +++ b/src/aspect/config.lua @@ -122,14 +122,12 @@ end --- Detect UTF8 module do - local utf8 = utf8 - if not utf8 then - for _, name in ipairs({"utf8", "lua-utf8"}) do - local ok, module = pcall(require, name) - if ok then - utf8 = module - break - end + local utf8 + for _, name in ipairs({"lua-utf8", "utf8", "lutf8"}) do + local ok, module = pcall(require, name) + if ok then + utf8 = module + break end end if utf8 then