diff --git a/filtering/macro.go b/filtering/macro.go index 9794f95f20..9c814d4db5 100644 --- a/filtering/macro.go +++ b/filtering/macro.go @@ -29,12 +29,12 @@ func applyMacros(exp *expr.Expr, sourceInfo *expr.SourceInfo, macros ...Macro) { } for _, macro := range macros { macro(cursor) + nextID = cursor.nextID if cursor.replaced { // Don't traverse children of replaced expr. return false } } - nextID = cursor.nextID return true }, exp) }