Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua 5.1 minimum compatibility #12

Merged
merged 3 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/luacheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Luacheck
uses: lunarmodules/luacheck@v0
uses: lunarmodules/luacheck@v1
11 changes: 1 addition & 10 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
std = "max"
std = "min+sile"
include_files = {
"**/*.lua",
"sile.in",
Expand All @@ -19,15 +19,6 @@ exclude_files = {
files["**/*_spec.lua"] = {
std = "+busted"
}
globals = {
"SILE",
"SU",
"luautf8",
"pl",
"fluent",
"SYSTEM_SILE_PATH",
"SHARED_LIB_EXT"
}
max_line_length = false
ignore = {
"581" -- operator order warning doesn't account for custom table metamethods
Expand Down
2 changes: 1 addition & 1 deletion packages/framebox/graphics/rough.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ local function _offsetOpt(x, ops, roughnessGain)
end

local function _line(x1, y1, x2, y2, o, move, overlay) -- returns an array of operations
local lengthSq = math.pow((x1 - x2), 2) + math.pow((y1 - y2), 2)
local lengthSq = (x1 - x2)^2 + (y1 - y2)^2
local length = math.sqrt(lengthSq)
local roughnessGain
if length < 200 then
Expand Down
33 changes: 33 additions & 0 deletions ptable.sile-2.0.1-1.rockspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
rockspec_format = "3.0"
package = "ptable.sile"
version = "2.0.1-1"
source = {
url = "git+https://github.com/Omikhleia/ptable.sile.git",
tag = "v2.0.1",
}
description = {
summary = "Paragraph boxes, framed boxes and table packages for the SILE typesetting system.",
detailed = [[
This package for the SILE typesetter provides struts, paragraph boxes
(parbox), framed boxes (framebox) and tables (ptable).
]],
homepage = "https://github.com/Omikhleia/ptable.sile",
license = "MIT",
}
dependencies = {
"lua >= 5.1",
"silex.sile >= 0.1.0",
}
build = {
type = "builtin",
modules = {
["sile.packages.struts"] = "packages/struts/init.lua",
["sile.packages.parbox"] = "packages/parbox/init.lua",
["sile.packages.ptable"] = "packages/ptable/init.lua",
["sile.packages.framebox"] = "packages/framebox/init.lua",
["sile.packages.framebox.graphics.prng"] = "packages/framebox/graphics/prng.lua",
["sile.packages.framebox.graphics.renderer"] = "packages/framebox/graphics/renderer.lua",
["sile.packages.framebox.graphics.rough"] = "packages/framebox/graphics/rough.lua",
["sile.resilient-compat.hboxing"] = "resilient-compat/hboxing.lua",
}
}