Skip to content

Option for ignoring regex #482

Closed
Closed
@FlorianUekermann

Description

@FlorianUekermann

A common issue is that tidy is fundamentally incompatible with most template engines.
It would be convenient if tidy could treat strings that match a particular regular expression the same way it treats comments.

Alternatively just preventing the addition of completely new pairs of tags would go a long way.

Small example to illustrate a typical case where not adding new tags or ignoring {{[^}]+}} would help:

<ul>
{{range .Models}}
<li>{{.Name}}</li>
{{end}}
</ul>

should not change at all, but is at the moment replaced by

<ul>
<li style="list-style: none">{{range .Models}}</li>
<li>{{.Name}}</li>
<li style="list-style: none">{{end}}</li>
</ul>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions