Skip to content

Main content

Markdown Backslash Escaped Punctuation Tool

Compute markdown backslash escaped punctuation from explicit bounded inputs.

Loading tool…

Description

If the second unit is ASCII punctuation return that character and escaped=true; otherwise preserve the original token and return escaped=false.

Markdown markers are interpreted in block and inline context, and extensions can add further syntax. Heading delimiters, backslash escapes, and task checkboxes each have local boundaries. A single-line or single-token recognizer does not necessarily reproduce a complete renderer.

If the second unit is ASCII punctuation return that character and escaped=true; otherwise preserve the original token and return escaped=false.

When to use this tool

Use Markdown Backslash Escaped Punctuation when you need this particular heading, escape, or task-marker recognition step on supplied text.

How to use the tool and how it works

  1. Enter token. 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 character, escaped. Inspect escaped before interpreting the associated values.

Require exactly two UTF-16 code units beginning with backslash. If the second unit is ASCII punctuation return that character and escaped=true; otherwise preserve the original token and return escaped=false.1

Input fieldMeaning and unitsAccepted input
tokenComplete literal token in the grammar stated above.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
characterDecoded character or preserved original token as described above.Required. Text; maximum UTF-16 length 8192.
escapedEscapedRequired. Boolean.
json
{
  "input": {
    "token": "\\*"
  },
  "output": {
    "character": "*",
    "escaped": true
  }
}

Limitations and assumptions

  • This labels one possible Markdown escape without parsing inline context. Astral characters do not fit the two-code-unit token shape, and a backslash before a nonpunctuation character is not removed.
  • 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 renderer or parser for the intended Markdown version and extensions when surrounding context matters. A local marker match is not full document conformance.

References

  1. Calculation and input contract: parse/markdown-backslash-escaped-punctuation — tool.io

Similar or alternative tools