Taritsyn / WebMarkupMin

The Web Markup Minifier (abbreviated WebMarkupMin) - a .NET library that contains a set of markup minifiers. The objective of this project is to improve the performance of web applications by reducing the size of HTML, XHTML and XML code.
Apache License 2.0
444 stars 48 forks source link

<div>${{something}}</div> incorrectly minified #9

Closed cweb187 closed 8 years ago

cweb187 commented 8 years ago

I've run into an issue with v1.1.0 using this with mustache.js style templates.

<html><head></head><body> <!-- some white space to remove --> <div>${{Price}}</div></body></html>

is turned into:

<html><head></head><body><div>{{{Price}}}/div></div></body></html>

I'm wondering if this is some other template style causing this, although I did not see this issue in 0.9.9. I'm using these settings:

new HtmlMinificationSettings { RemoveOptionalEndTags = false, MinifyEmbeddedCssCode = false, MinifyInlineCssCode = false, AttributeQuotesRemovalMode = WebMarkupMin.Core.HtmlAttributeQuotesRemovalMode.KeepQuotes };

Taritsyn commented 8 years ago

While rollback to version 1.0.0 (WebMarkupMin.Core and WebMarkupMin.Mvc can update to version 1.0.1).

In next week I will fix a errors.

Taritsyn commented 8 years ago

Hello!

In WebMarkupMin 1.1.2 and 2.0.0 RC 9 fixed this error.

... v1.1.0 using this with mustache.js style templates.

WebMarkupMin does not support the Mustache templates. Only supports DOM-based templates: KnockoutJS, Kendo UI MVVM, AngularJS 1.X, Angular 2, Aurelia and Polymer. In this case, code containing {{ }} is processed as Angular or Polymer template.