Skip to content

Commit

Permalink
Merge pull request #1183 from alerque/fix-deprecacions
Browse files Browse the repository at this point in the history
fix(core): Avoid crash on warn by using correct function
  • Loading branch information
alerque committed Jul 21, 2021
2 parents 449085f + 5d05be1 commit a3f3789
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions core/nodefactory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,67 +96,67 @@ nodefactory.box = pl.class({
end,

isBox = function (self)
SU.warning("Deprecated function, please use boolean is_<type> property to check types", true)
SU.warn("Deprecated function, please use boolean is_<type> property to check types", true)
return self.type == "hbox" or self.type == "zerohbox" or self.type == "alternative" or self.type == "nnode" or self.type == "vbox"
end,

isNnode = function (self)
SU.warning("Deprecated function, please use boolean is_<type> property to check types", true)
SU.warn("Deprecated function, please use boolean is_<type> property to check types", true)
return self.type=="nnode"
end,

isGlue = function (self)
SU.warning("Deprecated function, please use boolean is_<type> property to check types", true)
SU.warn("Deprecated function, please use boolean is_<type> property to check types", true)
return self.type == "glue"
end,

isVglue = function (self)
SU.warning("Deprecated function, please use boolean is_<type> property to check types", true)
SU.warn("Deprecated function, please use boolean is_<type> property to check types", true)
return self.type == "vglue"
end,

isZero = function (self)
SU.warning("Deprecated function, please use boolean is_<type> property to check types", true)
SU.warn("Deprecated function, please use boolean is_<type> property to check types", true)
return self.type == "zerohbox" or self.type == "zerovglue"
end,

isUnshaped = function (self)
SU.warning("Deprecated function, please use boolean is_<type> property to check types", true)
SU.warn("Deprecated function, please use boolean is_<type> property to check types", true)
return self.type == "unshaped"
end,

isAlternative = function (self)
SU.warning("Deprecated function, please use boolean is_<type> property to check types", true)
SU.warn("Deprecated function, please use boolean is_<type> property to check types", true)
return self.type == "alternative"
end,

isVbox = function (self)
SU.warning("Deprecated function, please use boolean is_<type> property to check types", true)
SU.warn("Deprecated function, please use boolean is_<type> property to check types", true)
return self.type == "vbox"
end,

isInsertion = function (self)
SU.warning("Deprecated function, please use boolean is_<type> property to check types", true)
SU.warn("Deprecated function, please use boolean is_<type> property to check types", true)
return self.type == "insertion"
end,

isMigrating = function (self)
SU.warning("Deprecated function, please use boolean is_<type> property to check types", true)
SU.warn("Deprecated function, please use boolean is_<type> property to check types", true)
return self.migrating
end,

isPenalty = function (self)
SU.warning("Deprecated function, please use boolean is_<type> property to check types", true)
SU.warn("Deprecated function, please use boolean is_<type> property to check types", true)
return self.type == "penalty"
end,

isDiscretionary = function (self)
SU.warning("Deprecated function, please use boolean is_<type> property to check types", true)
SU.warn("Deprecated function, please use boolean is_<type> property to check types", true)
return self.type == "discretionary"
end,

isKern = function (self)
SU.warning("Deprecated function, please use boolean is_<type> property to check types", true)
SU.warn("Deprecated function, please use boolean is_<type> property to check types", true)
return self.type == "kern"
end

Expand Down
2 changes: 1 addition & 1 deletion packages/pandoc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ local handlePandocArgs = function (options)
end)
end
else
SU.warning("Unhandled class ‘"..class.."’, not mapped to legacy option and no matching wrapper function")
SU.warn("Unhandled class ‘"..class.."’, not mapped to legacy option and no matching wrapper function")
end
end
options.classes = nil
Expand Down

0 comments on commit a3f3789

Please sign in to comment.