Skip to content

1.3.0

Choose a tag to compare

@GulomovCreative GulomovCreative released this 13 Sep 11:43
· 10 commits to master since this release
94bc55e

Added

  • Structural problems in a template are reported in the Problems panel: a
    construct with no end — [[, [[-, {, {*, {ignore}, a backtick
    without its pair — and Fenom block tags that do not pair up, including a
    closing tag that closes the wrong block and {else} or {case} outside the
    block they belong to. {set $x = 1} and {var $x = 1} are instructions, not
    blocks, and are left alone.
  • vscode-modx.diagnostics chooses how much is reported: off, unclosed
    (the default) or all. all adds unpaired HTML elements, which is worth
    having on a whole page and wrong on a chunk that opens an element another
    chunk closes — that is why it is not the default.

Changed

  • The MODX language configuration comes from its grammar package, as the Fenom
    one already did. Typing [[ closes it with ]], [[…]] works as a pair to
    select and surround with, and <, > and <!-- --> are understood the way
    they are in HTML.
  • MODX re-indents correctly while a tag is typed. The rules it used before
    outdented every line holding a tag that opened and closed on itself: in a
    template where half the lines are [[*pagetitle]], typing walked the
    indentation left a level at a time. The rules now come from the grammar
    package and are written against the real shapes — a multi-line snippet call
    indents, a self-contained tag does not move the line, [[- … ]] is a comment
    rather than an opening, and ]] inside a value in backticks closes nothing.
  • Folding in MODX follows <!-- #region --> and <!-- #endregion --> instead
    of bare [[ and ]] at the start of a line. The old markers are per-line —
    a line is either a start or an end — so [[*pagetitle]] opened a region that
    never closed.

Fixed

  • A forgotten backtick in a property value no longer colours the rest of the
    file as a string: the value ends at a blank line as well as at its closing
    backtick.

Full changelog: v1.2.0...v1.3.0