You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following file, the second item (bar) does not appear in the parsed data. Changing the value of foo for an inline value solves the problem.
baz:
- foo: |
x
- bar: y
This is because the first token after the | is an indent, and it is not counted towards the number of indents to undo to finish a textblock. Here's a fix:
diff --git a/yaml.lua b/yaml.lua
index 55211dc..6432b4a 100644
--- a/yaml.lua+++ b/yaml.lua@@ -448,6 +448,9 @@ Parser.parseTextBlock = function (self, sep)
local token = self:advance()
local result = string_trim(token.raw, "\n")
local indents = 0
+ if token[1] == "indent" then+ indents = 1+ end
while self:peek() ~= nil and ( indents > 0 or not self:peekType("dedent") ) do
local newtoken = self:advance()
while token.row < newtoken.row do
The text was updated successfully, but these errors were encountered:
In the following file, the second item (
bar
) does not appear in the parsed data. Changing the value offoo
for an inline value solves the problem.This is because the first token after the | is an indent, and it is not counted towards the number of indents to undo to finish a textblock. Here's a fix:
The text was updated successfully, but these errors were encountered: