Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add failing test where attribute closes the quotations prematurely #371

Closed
wants to merge 1 commit into from

Conversation

kamal
Copy link
Contributor

@kamal kamal commented Oct 19, 2020

When an attribute contains newlines, a mutation to a MustacheStatement inside of it will cause printing the AST to prematurely close the quotations, causing invalid markup.

Example,

<div
  class="
    block
    {{if this.foo "bar"}}
  "
>
  hello
</div>

when parsed, mutated and printed will produce

<div
  class=""
    block
    {{if this.foo "bar"}}
  "
>
  hello
</div>

@kamal kamal force-pushed the attribute-newline branch from 34d25eb to 46efceb Compare November 24, 2020 18:49
dcyriller added a commit that referenced this pull request Oct 30, 2021
@dcyriller
Copy link
Member

I am closing this PR as the failing test is fixed in #665

@dcyriller dcyriller closed this Oct 30, 2021
dcyriller added a commit that referenced this pull request Oct 30, 2021
Fix #371 (attribute closes the quotations prematurely)
@kamal kamal deleted the attribute-newline branch November 2, 2021 02:37
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.

2 participants