Taco de Wolff
Taco de Wolff
This has likely to do with a very similar issue with the Python binding, see https://github.com/tdewolff/minify/issues/535#issuecomment-1256793958 Basically, Go cannot be forked since it will only fork the main thread and...
@privatenumber Any update on this? Regarding this fixed, please reopen if not.
Move to roadmap.
Hey @infogulch , thanks for the effort! I believe the problem is a bit more difficult. For example, if your input is: ``` {{ $foobar := 'attr-value">' }}
After 8 years I've finally come around to implement this, thanks for the patience! In order to use this, you should try: ```go m.Add("text/html", &html.Minifier{ TemplateDelims: html.GoTemplateDelims, }) ```
Exactly, there isn't anything meaningful to do when templating gets involved, as anything can happen. Potentially we could minify text and attribute values surrounding the inner templates, but not sure...
Exactly, the output will be: ```html Foo ``` That is, the `selected` isn't minified, the `style` is (the parser doesn't look at the content of the templates, and is template...
You are correct. Basically `Foo` is seen as `Foo`, and thus we _do_ minify the `style` attribute. In your second example, it will disable minifying when the content has a...
True, or use the `\uFFFC` Unicode object replacement character for that. The problem is that after replacing the templates e.g. in a piece of JavaScript, we then send it to...
You can output JSON by calling `ast.JSONString() (string, error)` or using the `JSON(io.Writer) error` interfaces on all AST nodes. Considering this issue fixed.