Skip to content

Commit

Permalink
Fix utf8 deps
Browse files Browse the repository at this point in the history
  • Loading branch information
bzick committed Jun 30, 2020
1 parent 0d9640c commit cc8ffa2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .travis/before.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/dev/date.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Documentation coming soon. See [date.lua](https://github.com/unifire-app/aspect/blob/master/src/aspect/date.lua)
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
14 changes: 6 additions & 8 deletions src/aspect/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc8ffa2

Please sign in to comment.