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
- Enter token. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| token | Complete literal token in the grammar stated above. | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| character | Decoded character or preserved original token as described above. | Required. Text; maximum UTF-16 length 8192. |
| escaped | Escaped | Required. Boolean. |
{
"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
Similar or alternative tools
- Markdown Heading Closing Hash Boundary
Remove a trailing hash run only when preceded by whitespace, returning trimmed content and closingHashes.
- Markdown List Task Checkbox Token
Recognize a standalone task-checkbox marker and return its checked state.