Skip to content

mdl 1: a log/message template containing a line break cannot be written as plain template text #746

Description

@ako

Found while implementing fmt --upgrade (#742/#735).

Under mdl 1, \\ is no longer an escape (#741), and a multi-line string literal is stored as the expression exactly as written. So a log or show message template that must contain a line break has no mdl 1 spelling as plain template text. Rewriting it turns the text into a {1} parameter, which writes a different microflow, as the execute-both test showed on mdl-examples/.../264-log-node-expression-roundtrip.mdl. That script stays on mdl 0 in the upgrade test's keepsItsVersion list.

Decide how mdl 1 spells a line break inside a template. Two options:

  • a literal line break inside the quotes, stored as template text;
  • $$…$$, as used for other foreign content.

Then add the fmt --upgrade rewrite and remove 264 from keepsItsVersion.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions