--- &test-R4YG
Title: Spec Example 8.2. Block Indentation Indicator
Tags: [ folded, libyaml-err, literal, scalar, spec, upto-1.2, whitespace ]
- |
detected
- >
# detected
- |1
explicit
- >
detected
+STR
+DOC
+SEQ
=VAL |detected\n
=VAL >\n\n# detected\n
=VAL | explicit\n
=VAL >\t\ndetected\n
-SEQ
-DOC
-STR
[
"detected\n",
"\n\n# detected\n",
" explicit\n",
"\t\ndetected\n"
]
json_diff
parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 1, column 65
json_diff
[
"detected\n",
"\n\n# detected\n",
" explicit\n",
"\t detected\n"
]
json_diff
[
"detected\n",
"\n \n # detected\n",
" explicit\n",
"\t\ndetected\n"
]
error
+STR
+DOC
+SEQ
=VAL |detected\n
=VAL >\n\n# detected\n
=VAL | explicit\n
Parse error: found a tab character where an indentation space is expected
error
yaml: line 10: found a tab character where an indentation space is expected
error
luajit: 7:3: found a tab character where an indentation space is expected
stack traceback:
[C]: in function 'error'
/usr/local/share/lua/5.1/lyaml/init.lua:306: in function 'error'
/usr/local/share/lua/5.1/lyaml/init.lua:325: in function 'parse'
/usr/local/share/lua/5.1/lyaml/init.lua:443: in function 'load_node'
/usr/local/share/lua/5.1/lyaml/init.lua:393: in function 'load_node'
/usr/local/share/lua/5.1/lyaml/init.lua:497: in function 'load'
/yaml/bin/lua-lyaml-json:6: in main chunk
[C]: at 0x562085b86ed0
error
YAML::PP::LibYAML Error: The problem:
found a tab character where an indentation space is expected
was found at , line: 10, column: 2
while scanning a block scalar at line: 9, column: 3
error
YAML::PP::LibYAML Error: The problem:
found a tab character where an indentation space is expected
was found at , line: 10, column: 2
while scanning a block scalar at line: 9, column: 3
error
YAML::Tiny found bad indenting in line '- |1' at /yaml/bin/perl-tiny-json line 12.
error
YAML::Tiny found bad indenting in line '- |1' at /yaml/bin/perl-tiny-perl line 15.
error
YAML::XS::Load Error: The problem:
found a tab character where an indentation space is expected
was found at document: 1, line: 10, column: 2
while scanning a block scalar at line: 9, column: 3
error
YAML::XS::Load Error: The problem:
found a tab character where an indentation space is expected
was found at document: 1, line: 10, column: 2
while scanning a block scalar at line: 9, column: 3
error
+STR
+DOC
+SEQ
=VAL |detected\n
Traceback (most recent call last):
File "/yaml/bin/py-ruamel-event", line 9, in <module>
for event in yaml.parse(sys.stdin.read()):
File "/python/lib/python3.12/site-packages/ruamel/yaml/main.py", line 371, in parse
while parser.check_event():
^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 141, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 538, in parse_block_sequence_entry
if not self.scanner.check_token(BlockEntryToken, BlockEndToken):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 170, in check_token
self.fetch_more_tokens()
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 298, in fetch_more_tokens
return self.fetch_folded()
^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 683, in fetch_folded
self.fetch_block_scalar(style='>')
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 691, in fetch_block_scalar
self.tokens.append(self.scan_block_scalar(style))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 1128, in scan_block_scalar
breaks, max_indent, end_mark = self.scan_block_scalar_indentation()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 1317, in scan_block_scalar_indentation
raise ScannerError(
ruamel.yaml.scanner.ScannerError: more indented follow up line than first in a block scalar
in "<unicode string>", line 6, column 3:
# detected
^ (line: 6)
error
Traceback (most recent call last):
File "/yaml/bin/py-ruamel-json", line 21, in <module>
for doc in yaml.load_all(sys.stdin.read()):
File "/python/lib/python3.12/site-packages/ruamel/yaml/main.py", line 476, in load_all
yield constructor.get_data()
^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 110, in get_data
return self.construct_document(self.composer.get_node())
^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 63, in get_node
return self.compose_document()
^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 94, in compose_document
node = self.compose_node(None, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 128, in compose_node
node = self.compose_sequence_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 172, in compose_sequence_node
while not self.parser.check_event(SequenceEndEvent):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 141, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 538, in parse_block_sequence_entry
if not self.scanner.check_token(BlockEntryToken, BlockEndToken):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 170, in check_token
self.fetch_more_tokens()
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 298, in fetch_more_tokens
return self.fetch_folded()
^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 683, in fetch_folded
self.fetch_block_scalar(style='>')
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 691, in fetch_block_scalar
self.tokens.append(self.scan_block_scalar(style))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 1128, in scan_block_scalar
breaks, max_indent, end_mark = self.scan_block_scalar_indentation()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 1317, in scan_block_scalar_indentation
raise ScannerError(
ruamel.yaml.scanner.ScannerError: more indented follow up line than first in a block scalar
in "<unicode string>", line 6, column 3:
# detected
^ (line: 6)
error
Traceback (most recent call last):
File "/yaml/bin/py-ruamel-py", line 38, in <module>
for doc in yaml.load_all(sys.stdin.read()):
File "/python/lib/python3.12/site-packages/ruamel/yaml/main.py", line 476, in load_all
yield constructor.get_data()
^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 110, in get_data
return self.construct_document(self.composer.get_node())
^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 63, in get_node
return self.compose_document()
^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 94, in compose_document
node = self.compose_node(None, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 128, in compose_node
node = self.compose_sequence_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 172, in compose_sequence_node
while not self.parser.check_event(SequenceEndEvent):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 141, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 538, in parse_block_sequence_entry
if not self.scanner.check_token(BlockEntryToken, BlockEndToken):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 170, in check_token
self.fetch_more_tokens()
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 298, in fetch_more_tokens
return self.fetch_folded()
^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 683, in fetch_folded
self.fetch_block_scalar(style='>')
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 691, in fetch_block_scalar
self.tokens.append(self.scan_block_scalar(style))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 1128, in scan_block_scalar
breaks, max_indent, end_mark = self.scan_block_scalar_indentation()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 1317, in scan_block_scalar_indentation
raise ScannerError(
ruamel.yaml.scanner.ScannerError: more indented follow up line than first in a block scalar
in "<unicode string>", line 6, column 3:
# detected
^ (line: 6)
error
/ruby/gems/psych/lib/psych.rb:458:in `parse': (<unknown>): found a tab character where an indentation space is expected while scanning a block scalar at line 9 column 3 (Psych::SyntaxError)
from /ruby/gems/psych/lib/psych.rb:458:in `parse_stream'
from /ruby/gems/psych/lib/psych.rb:632:in `load_stream'
from /yaml/bin/ruby-psych-json:6:in `<main>'
error
+STR
+DOC
+SEQ
=VAL |detected\n
=VAL >\n\n# detected\n
=VAL | explicit\n
Error: ScanError { mark: Marker { index: 57, line: 10, col: 1 }, info: "while scanning a block scalar, found a tab character where an indentation space is expected" }
na
Line Col Char Byte Token|Content
1 0 0 0 +DOC |
1 0 0 0 +NODE|
1 0 0 0 +SEQ |
1 0 0 0 =SYNX|-
1 1 1 1 +NODE|
1 1 1 1 =WSPC|.
1 2 2 2 +VAL |
1 2 2 2 =SYNX||
1 3 3 3 =EOL |\x0a
2 0 4 4 =DENT|.
2 1 5 5 =TEXT|detected
2 9 13 13 =NEWL|\x0a
3 0 14 14 -VAL |
3 0 14 14 -NODE|
3 0 14 14 =SYNX|-
3 1 15 15 +NODE|
3 1 15 15 =WSPC|.
3 2 16 16 +VAL |
3 2 16 16 =SYNX|>
3 3 17 17 =EOL |\x0a
4 0 18 18 =DENT|.
4 1 19 19 =NEWL|\x0a
5 0 20 20 =DENT|.
5 1 21 21 =TEXT|.
5 2 22 22 =NEWL|\x0a
6 0 23 23 =DENT|.
6 1 24 24 =TEXT|.#.detected
6 12 35 35 =NEWL|\x0a
7 0 36 36 -VAL |
7 0 36 36 -NODE|
7 0 36 36 =SYNX|-
7 1 37 37 +NODE|
7 1 37 37 =WSPC|.
7 2 38 38 +VAL |
7 2 38 38 =SYNX||
7 3 39 39 =SYNX|1
7 4 40 40 =EOL |\x0a
8 0 41 41 =DENT|.
8 1 42 42 =TEXT|.explicit
8 10 51 51 =NEWL|\x0a
9 0 52 52 -VAL |
9 0 52 52 -NODE|
9 0 52 52 =SYNX|-
9 1 53 53 +NODE|
9 1 53 53 =WSPC|.
9 2 54 54 +VAL |
9 2 54 54 =SYNX|>
9 3 55 55 =EOL |\x0a
10 0 56 56 =DENT|.
10 1 57 57 =TEXT|\x09
10 2 58 58 =NEWL|\x0a
11 0 59 59 =DENT|.
11 1 60 60 =TEXT|detected
11 9 68 68 =NEWL|\x0a
12 0 69 69 -VAL |
12 0 69 69 -NODE|
12 0 69 69 -SEQ |
12 0 69 69 -NODE|
12 0 69 69 -DOC |
na
[
'detected
',
'
# detected
',
' explicit
',
'
detected
'
]
na
[
'detected
',
'
# detected
',
' explicit
',
' detected
'
]
na
[
'detected
',
'
# detected
',
' explicit
',
'
detected
'
]
na
['detected\n', '\n\n# detected\n', ' explicit\n', '\t\ndetected\n']