Skip to content

Commit

Permalink
Cast start number of ordered list item to integer in Lua 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Mar 19, 2019
1 parent f07a5e4 commit a4ecb44
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lunamark/reader/markdown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,9 @@ function M.new(writer, options)
local function ordered_list(s,tight,startnum)
if options.startnum then
startnum = tonumber(startnum) or 1 -- fallback for '#'
if startNumber ~= nil then
startNumber = math.floor(startNumber)
end
else
startnum = nil
end
Expand Down

0 comments on commit a4ecb44

Please sign in to comment.