fix: ensure filter directive get cleaned on build.
This commit is contained in:
parent
327c1dec33
commit
117e63d88f
2 changed files with 2 additions and 1 deletions
|
|
@ -65,7 +65,7 @@ func NewOption(file *paths.Path, match []string) *Option {
|
|||
// Useful to remove directive text applied on some condition only
|
||||
func (o *Option) Clean(profile string) string {
|
||||
reg := regexp.MustCompile(`\s*` + Keyword + o.Name + ` .*$`)
|
||||
return reg.ReplaceAllString(profile, "")
|
||||
return strings.Replace(profile, o.Raw, reg.ReplaceAllString(o.Raw, ""), 1)
|
||||
}
|
||||
|
||||
func RegisterDirective(d Directive) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue