Expand description
Template-injection scan matchers ported from
guard_core/handlers/_suspatterns_templates.py (spec 4.0.2).
Region scan between opening/closing delimiters ({{ }}, ${ }, {% %},
<% %>, #{ }), not naive regex: an indicator must appear strictly inside
the region, and {{/#{ forms skip regions dominated by a date.
The indicator sources embed a (?<!\d) guard in front of the literal
arithmetic branch; the guard is enforced with a char check on the candidate
start (a candidate beginning mid-number is rejected, mirroring the
lookbehind exactly because every inner start of a digit run is also
digit-preceded).
Structs§
Constants§
Functions§
- template_
expression_ matches _template_expression_matches: indicator inside the region, with the date-dominance restart for{{/#{forms.- template_
keyword_ matches _template_keyword_matches: an indicator keyword must appear strictly inside the region (excluding the first char after the opening delimiter).- template_
regions _template_regions: opening/closing delimiter pairs with the reference’s cursor advance (cursor = max(body_start, barrier - len(opening) + 1)).