Description
Return endMarker and the text after # without trimming, or an empty comment when absent or unmatched.
YAML uses context-sensitive indicators for scalar styles, indentation, tags, anchors, and document boundaries. A token may be meaningful only within the surrounding stream and indentation structure. Recognizing one header or marker is distinct from parsing a document or resolving its values.
Return endMarker and the text after # without trimming, or an empty comment when absent or unmatched.
When to use this tool
Use Yaml Explicit Document End Marker when you need to recognize the supported YAML marker or header token before a broader parsing step.
How to use the tool and how it works
- Enter line. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read endMarker, comment. Inspect endMarker before interpreting the associated values.
Recognize a line consisting of ... at column zero, optionally followed by spaces or tabs and a # comment. Return endMarker and the text after # without trimming, or an empty comment when absent or unmatched.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| line | One supplied line under the stated newline policy. | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| endMarker | End Marker | Required. Boolean. |
| comment | Comment | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"line": "... # end"
},
"output": {
"endMarker": true,
"comment": " end"
}
} Limitations and assumptions
- Leading indentation, trailing line terminators, and comments without separating whitespace do not match. This recognizes one marker line without parsing a stream or proving that a document ended in valid context.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use a full YAML parser for stream context, indentation, aliases, tags, scalar content, and document validity. Treat the output as the stated local recognition result.
References
Similar or alternative tools
- Yaml Tag Handle Empty Suffix
Inspect a supplied YAML tag handle and suffix without resolving tag directives.
- Parsing: Yaml Block Chomp Indicator
Parse a restricted YAML block-scalar style/indent/chomping indicator token in either allowed modifier order; does not parse indentation, content or a YAML document.