Skip to content

Commit

Permalink
add exception for spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
jbyuki committed Mar 28, 2023
1 parent 9bc408c commit 3b0a1bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lua/nabla/ascii.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1542,7 +1542,7 @@ function to_ascii(explist, exp_i)

elseif exp.kind == "symexp" then
local sym = exp.sym
if not string.match(sym, "^%a") and not string.match(sym, "^%d") and not string.match(sym, "^%s+$") and sym ~= special_syms["cdot"] and sym ~= "/" and sym ~= special_syms["partial"] and sym ~= "[" and sym ~= "]" then
if not string.match(sym, "^%a") and not string.match(sym, "^%d") and not string.match(sym, "^%s+$") and sym ~= special_syms["cdot"] and sym ~= "/" and sym ~= special_syms["partial"] and sym ~= "[" and sym ~= "]" and sym ~= "'" then
sym = " " .. sym .. " "
end

Expand Down Expand Up @@ -1580,7 +1580,7 @@ function to_ascii(explist, exp_i)
local t
if special_syms[name] then
t = "sym"
if not string.match(sym, "^%a") and not string.match(sym, "^%d") and not string.match(sym, "^%s+$") and sym ~= special_syms["cdot"] and sym ~= "/" and sym ~= special_syms["partial"] and sym ~= "[" and sym ~= "]" then
if not string.match(sym, "^%a") and not string.match(sym, "^%d") and not string.match(sym, "^%s+$") and sym ~= special_syms["cdot"] and sym ~= "/" and sym ~= special_syms["partial"] and sym ~= "[" and sym ~= "]" and sym ~= "'" then
sym = " " .. sym .. " "
end

Expand Down
2 changes: 1 addition & 1 deletion src/core/space_around_op.lua.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##../ascii
@put_spacing_around_operators+=
if not string.match(sym, "^%a") and not string.match(sym, "^%d") and not string.match(sym, "^%s+$") and sym ~= special_syms["cdot"] and sym ~= "/" and sym ~= special_syms["partial"] and sym ~= "[" and sym ~= "]" then
if not string.match(sym, "^%a") and not string.match(sym, "^%d") and not string.match(sym, "^%s+$") and sym ~= special_syms["cdot"] and sym ~= "/" and sym ~= special_syms["partial"] and sym ~= "[" and sym ~= "]" and sym ~= "'" then
sym = " " .. sym .. " "
end

0 comments on commit 3b0a1bb

Please sign in to comment.