Skip to content

Antlers Runtime Bugfixes - #5477

Merged
jasonvarga merged 16 commits into
statamic:masterfrom
Stillat:antlers-runtime-bugfixes
Mar 15, 2022
Merged

Antlers Runtime Bugfixes#5477
jasonvarga merged 16 commits into
statamic:masterfrom
Stillat:antlers-runtime-bugfixes

Conversation

@JohnathonKoster

@JohnathonKoster JohnathonKoster commented Mar 11, 2022

Copy link
Copy Markdown
Contributor

This PR resolves/makes improvements to a few Antlers Runtime (and related) items:

  • Closes 3.3 beta – Weird string with runtime parser #5463 - Adds support for yielding the same section within a section, and mimics the current behavior of this
  • The Assets tag will now resolve Builder instances (affected both Regex and Runtime)
  • Adds sanity checks when producing error messages to ensure that nodes lacking their start line information do not trigger their own exceptions (mainly from virtualized/constructed nodes)
  • Ensures shorthand modifier syntax stops parsing when it encounters symbolic operators
  • Ensures arrays of objects can be supplied to modifiers
  • Makes modifier parameter delimiters consistent when using array/tag parameter style for both tag pairs and non tag pairs (the delimiter is now | on both cases)
  • Provides a way to escape the | when providing multiple parameters to modifiers using array/tag parameter style
  • Resolves Builder instances when treated as a variable inside existing Antlers contexts (dynamic variable binding, etc.)
  • Closes 3.3 beta - Issue when using unnamed slot #5492 by ensuring the data manager resolves augmented values if there are still parts of the variable left

Array/Tag Parameter Style Delimiter Changes

Tag pairs and non-tag pairs will both now require the | character to separate parameters:

{{ array_var modifier="param1|param2" }}

{{ /array_var }}

Non tag-pairs will now require this as well:

{{ date_var modifier="param1|param2" }}

Developers may now escape the | character inside parameters:

{{ string_var ensure_right="\|" }}

JohnathonKoster and others added 16 commits March 11, 2022 17:15
Virtual nodes may sometimes lack these details
Prevents the lexer from scanning to the end of the node and constructing "one giant string value"
If assets is a QueryBuilder instance, there was too much ambiguity inside the processor. This forces the tag to handle it
Makes modifier parameter logic consistent with Regex Antlers
Both tag pairs and non-pairs will now expect `|` as the modifier parameter separator.

Template developers can now natively escape the `|` character by prefixing it with the `\`:

{{ variable modifier="param_one|param\|two" }}
@jasonvarga
jasonvarga merged commit be94ae0 into statamic:master Mar 15, 2022
@jasonvarga
jasonvarga deleted the antlers-runtime-bugfixes branch March 15, 2022 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants