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

Code blocks not fully ignored when in style tag #405

Open
itamar-getloam opened this issue Aug 14, 2022 · 0 comments
Open

Code blocks not fully ignored when in style tag #405

itamar-getloam opened this issue Aug 14, 2022 · 0 comments

Comments

@itamar-getloam
Copy link

Hi,
I'm using juice to pack an HTML file which uses Handlebars, and I found what seems to be a bug. Here's the reproduction.

To sum it up, if we process the following HTML:

<style>
    .somediv {
        color: blue;
    }

</style>

<!-- First example: Condition is outside of tag value and is ignored successfully -->
<div class="somediv" {{#if @first}} style="border-top: 1px solid #D7DFDF;" {{/if}}></div>

<!-- Second example: Condition is inside the tags value and the second part is dropped ( {{/if}} ) -->
<div class="somediv" style="{{#if @first}} border-top: 1px solid #D7DFDF; {{/if}}"></div>

You can see that the second example is missing its closing {{/if}}
I tried playing around and adding several, more specific, options to codeBlocks, but to no avail.

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

No branches or pull requests

1 participant