Skip to content

Commit

Permalink
fix: YAML error on array of multiline string
Browse files Browse the repository at this point in the history
Synchronized tinyyaml vendored copy with api7's v0.4.4
  • Loading branch information
Omikhleia authored and Didier Willis committed Dec 8, 2023
1 parent 10e5c72 commit 09a2208
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lua-libraries/README.tinyyaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
The "vendored" version of tinyyaml used here is:
https://github.com/api7/lua-tinyyaml (0.4.3 rockspec at the time of initial
import)
https://github.com/api7/lua-tinyyaml (0.4.4 rockspec at the time)

It's a fork from:
https://github.com/peposso/lua-tinyyaml (which had a 1.0 rockspec earlier)
Expand Down
4 changes: 3 additions & 1 deletion lua-libraries/resilient-tinyyaml.lua
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,10 @@ function Parser:parseseq(line, lines, indent)
error("did not find expected alphabetic or numeric character")
elseif rest then
-- Array entry with a value
local nextline = lines[1]
local indent2 = countindent(nextline)
tremove(lines, 1)
tinsert(seq, self:parsescalar(rest, lines))
tinsert(seq, self:parsescalar(rest, lines, indent2))
end
end
return seq
Expand Down

0 comments on commit 09a2208

Please sign in to comment.