Skip to content

Main content

Yaml Explicit Document End Marker Tool

Compute yaml explicit document end marker from explicit bounded inputs.

Loading tool…

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

  1. Enter line. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
lineOne supplied line under the stated newline policy.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
endMarkerEnd MarkerRequired. Boolean.
commentCommentRequired. Text; maximum UTF-16 length 8192.
json
{
  "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

  1. Calculation and input contract: parse/yaml-explicit-document-end-marker — tool.io

Similar or alternative tools