--- &test-F8F9
Title: Spec Example 8.5. Chomping Trailing Lines
Tags: [ comment, literal, scalar, spec ]
# Strip
# Comments:
strip: |-
# text
# Clip
# comments:
clip: |
# text
# Keep
# comments:
keep: |+
# text
# Trail
# comments.
+STR
+DOC
+MAP
=VAL :strip
=VAL |# text
=VAL :clip
=VAL |# text\n
=VAL :keep
=VAL |# text\n\n
-MAP
-DOC
-STR
{
"clip": "# text\n",
"keep": "# text\n\n",
"strip": "# text"
}
error
YAML::Tiny found bad indenting in line 'clip: |' at /yaml/bin/perl-tiny-json line 12.
error
YAML::Tiny found bad indenting in line 'clip: |' at /yaml/bin/perl-tiny-perl line 15.
na
Line Col Char Byte Token|Content
1 0 0 0 =WSPC|.
1 1 1 1 +COMM|
1 1 1 1 =SYNX|#
1 2 2 2 =META|.Strip
1 8 8 8 -COMM|
1 8 8 8 =EOL |\x0a
2 0 9 9 =WSPC|..
2 2 11 11 +COMM|
2 2 11 11 =SYNX|#
2 3 12 12 =META|.Comments:
2 13 22 22 -COMM|
2 13 22 22 =EOL |\x0a
3 0 23 23 +DOC |
3 0 23 23 +NODE|
3 0 23 23 +MAP |
3 0 23 23 +PAIR|
3 0 23 23 +NODE|
3 0 23 23 +VAL |
3 0 23 23 =TEXT|strip
3 5 28 28 -VAL |
3 5 28 28 -NODE|
3 5 28 28 =SYNX|:
3 6 29 29 +NODE|
3 6 29 29 =WSPC|.
3 7 30 30 +VAL |
3 7 30 30 =SYNX||
3 8 31 31 =SYNX|-
3 9 32 32 =EOL |\x0a
4 0 33 33 =DENT|..
4 2 35 35 =TEXT|#.text
4 8 41 41 -VAL |
4 8 41 41 =EOL |\x0a
5 0 42 42 =DENT|..
5 2 44 44 =EOL |\x0a
6 0 45 45 =DENT|.
6 1 46 46 +COMM|
6 1 46 46 =SYNX|#
6 2 47 47 =META|.Clip
6 7 52 52 -COMM|
6 7 52 52 =EOL |\x0a
7 0 53 53 =WSPC|..
7 2 55 55 +COMM|
7 2 55 55 =SYNX|#
7 3 56 56 =META|.comments:
7 13 66 66 -COMM|
7 13 66 66 =EOL |\x0a
8 0 67 67 =EOL |\x0a
9 0 68 68 -NODE|
9 0 68 68 -PAIR|
9 0 68 68 +PAIR|
9 0 68 68 +NODE|
9 0 68 68 +VAL |
9 0 68 68 =TEXT|clip
9 4 72 72 -VAL |
9 4 72 72 -NODE|
9 4 72 72 =SYNX|:
9 5 73 73 +NODE|
9 5 73 73 =WSPC|.
9 6 74 74 +VAL |
9 6 74 74 =SYNX||
9 7 75 75 =EOL |\x0a
10 0 76 76 =DENT|..
10 2 78 78 =TEXT|#.text
10 8 84 84 =NEWL|\x0a
11 0 85 85 -VAL |
11 0 85 85 =DENT|.
11 1 86 86 =EOL |\x0a
12 0 87 87 =DENT|.
12 1 88 88 +COMM|
12 1 88 88 =SYNX|#
12 2 89 89 =META|.Keep
12 7 94 94 -COMM|
12 7 94 94 =EOL |\x0a
13 0 95 95 =WSPC|..
13 2 97 97 +COMM|
13 2 97 97 =SYNX|#
13 3 98 98 =META|.comments:
13 13 108 108 -COMM|
13 13 108 108 =EOL |\x0a
14 0 109 109 =EOL |\x0a
15 0 110 110 -NODE|
15 0 110 110 -PAIR|
15 0 110 110 +PAIR|
15 0 110 110 +NODE|
15 0 110 110 +VAL |
15 0 110 110 =TEXT|keep
15 4 114 114 -VAL |
15 4 114 114 -NODE|
15 4 114 114 =SYNX|:
15 5 115 115 +NODE|
15 5 115 115 =WSPC|.
15 6 116 116 +VAL |
15 6 116 116 =SYNX||
15 7 117 117 =SYNX|+
15 8 118 118 =EOL |\x0a
16 0 119 119 =DENT|..
16 2 121 121 =TEXT|#.text
16 8 127 127 =NEWL|\x0a
17 0 128 128 =NEWL|\x0a
18 0 129 129 -VAL |
18 0 129 129 =DENT|.
18 1 130 130 +COMM|
18 1 130 130 =SYNX|#
18 2 131 131 =META|.Trail
18 8 137 137 -COMM|
18 8 137 137 =EOL |\x0a
19 0 138 138 =WSPC|..
19 2 140 140 +COMM|
19 2 140 140 =SYNX|#
19 3 141 141 =META|.comments.
19 13 151 151 -COMM|
19 13 151 151 =EOL |\x0a
20 0 152 152 -NODE|
20 0 152 152 -PAIR|
20 0 152 152 -MAP |
20 0 152 152 -NODE|
20 0 152 152 -DOC |
na
{
'clip' => '# text
',
'keep' => '# text
',
'strip' => '# text'
}
na
{
'clip' => '# text
',
'keep' => '# text
',
'strip' => '# text'
}
na
{
'clip' => '# text
',
'keep' => '# text
',
'strip' => '# text'
}
na
{
'clip' => '# text
',
'keep' => '# text
',
'strip' => '# text'
}
na
{
'clip' => '# text
',
'keep' => '# text
',
'strip' => '# text'
}
na
{'clip': '# text\n', 'keep': '# text\n\n', 'strip': '# text'}
na
{'clip': '# text\n', 'keep': '# text\n\n', 'strip': '# text'}