Skip to content

Enable extending syntaxes to override indentation constraints - #224

Merged
michaelblyons merged 1 commit into
masterfrom
feat/override-noindent
May 25, 2026
Merged

michaelblyons merged 1 commit into
masterfrom
feat/override-noindent

Conversation

@deathaxe

Copy link
Copy Markdown
Member

This commit introduces no_indent variable, inspired by Bash, to enable extending syntaxes to override indentation constraints.

Use cases:

  • embed powershell in indented fenced code blocks in Markdown
  • embed powershell in YAML files, such as Github Action workflows

Alternative:

A more general and easier to use approach would be to accept ST not tracking indentation and just allow to terminate HEREDOCs regardless leading whitespace in general. It would enable proper highlighting without further meassures being taken on 3rd-party syntaxes.

This commit introduces `no_indent` variable, inspired by Bash, to enable
extending syntaxes to override indentation constraints.

Use cases:
- embed powershell in indented fenced code blocks in Markdown
- embed powershell in YAML files, such as Github Action workflows

Alternative:

A more general and easier to use approach would be to accept ST not tracking
indentation and just allow to terminate HEREDOCs regardless leading whitespace
in general.