Skip to content

n:syntax does not reset syntax after closing element tag #358

Description

@daun

Version: 3.0.13

Bug Description

When using n:syntax on an element node, the closing tag does not reset the syntax. Any content after the closing element tag is treated as text.

Steps To Reproduce

In theory, this should resolve both outer {$var} and leave the inner {$var} untouched.

{$var} <div n:syntax="off">{$var}</div> {$var}

In reality, this is what's rendered:

hello <div>{$var}</div> {$var}

See fiddle f6d9e5b641 for a demonstration.

Expected Behavior

The content after the element should resume parsing normally and also print the second outer {$var}.

hello <div>{$var}</div> hello

Possible Solution

Not sure. Stumbled upon this by accident while trying to solve a similar situation in a custom tag, and wanted to check how the core handles this. Eager to learn the solution here :)

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions