Skip to content

v0.0.33

Choose a tag to compare

@reteps reteps released this 19 Feb 17:47
· 106 commits to master since this release
14ccc7a

What's new

  • Configurable indentation for custom code tags: Custom code tags (e.g. <pl-code>) now support a new indent setting with three modes:
    • "never" (default): preserves content as-is (existing behavior)
    • "always": dedents content to column 0 and re-indents at the current nesting level
    • "attribute": dedents and re-indents only when a specified attribute has a truthy value (not "", "false", or "0")
  • New indentAttribute setting specifies which HTML attribute to check when using indent: "attribute" mode

Example configuration

{
  "htmlmustache.customCodeTags": [
    {
      "name": "pl-code",
      "languageAttribute": "language",
      "indent": "attribute",
      "indentAttribute": "source-file-name"
    }
  ]
}