hasIncludeDirectives reports whether content contains any include/import directive that ParseImportDirective could match. Used as a fast pre-check to avoid scanner allocations. Matches @include, @import (legacy), and {{#import (legacy) forms.
(content string)
| 18 | // ParseImportDirective could match. Used as a fast pre-check to avoid scanner allocations. |
| 19 | // Matches @include, @import (legacy), and {{#import (legacy) forms. |
| 20 | func hasIncludeDirectives(content string) bool { |
| 21 | return strings.Contains(content, "@include") || |
| 22 | strings.Contains(content, "@import") || |
| 23 | strings.Contains(content, "{{#import") |
| 24 | } |
| 25 | |
| 26 | // ExpandIncludes recursively expands @include and @import directives until no more remain |
| 27 | // This matches the bash expand_includes function behavior |
no outgoing calls
no test coverage detected