Added new "c" flag to clobber custom tags when needed

This commit is contained in:
Mike Farah
2022-08-29 15:38:21 +10:00
parent b1a40a9fb7
commit b4ca184108
11 changed files with 155 additions and 14 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ func (n *CandidateNode) UpdateAttributesFrom(other *CandidateNode, prefs assignP
n.Node.Kind = other.Node.Kind
// don't clobber custom tags...
if strings.HasPrefix(n.Node.Tag, "!!") || n.Node.Tag == "" {
if prefs.ClobberCustomTags || strings.HasPrefix(n.Node.Tag, "!!") || n.Node.Tag == "" {
n.Node.Tag = other.Node.Tag
}