@@ -272,6 +272,22 @@ def _find_include(template: str):
272
272
return _INCLUDE_PATTERN .search (template )
273
273
274
274
275
+ def _find_hash_comment (template : str ):
276
+ return _HASH_COMMENT_PATTERN .search (template )
277
+
278
+
279
+ def _find_block_comment (template : str ):
280
+ return _BLOCK_COMMENT_PATTERN .search (template )
281
+
282
+
283
+ def _find_token (template : str ):
284
+ return _TOKEN_PATTERN .search (template )
285
+
286
+
287
+ def _token_is_on_own_line (text_before_token : str ) -> bool :
288
+ return _LSTRIP_BLOCK_PATTERN .search (text_before_token ) is not None
289
+
290
+
275
291
def _exists_and_is_file (path : str ) -> bool :
276
292
try :
277
293
return (os .stat (path )[0 ] & 0b_11110000_00000000 ) == 0b_10000000_00000000
@@ -456,14 +472,6 @@ def _replace_blocks_with_replacements(template: str, replacements: "dict[str, st
456
472
return template
457
473
458
474
459
- def _find_hash_comment (template : str ):
460
- return _HASH_COMMENT_PATTERN .search (template )
461
-
462
-
463
- def _find_block_comment (template : str ):
464
- return _BLOCK_COMMENT_PATTERN .search (template )
465
-
466
-
467
475
def _remove_comments (
468
476
template : str ,
469
477
* ,
@@ -497,14 +505,6 @@ def _remove_matched_comment(template: str, comment_match: re.Match):
497
505
return template
498
506
499
507
500
- def _find_token (template : str ):
501
- return _TOKEN_PATTERN .search (template )
502
-
503
-
504
- def _token_is_on_own_line (text_before_token : str ) -> bool :
505
- return _LSTRIP_BLOCK_PATTERN .search (text_before_token ) is not None
506
-
507
-
508
508
def _create_template_rendering_function ( # pylint: disable=,too-many-locals,too-many-branches,too-many-statements
509
509
template : str ,
510
510
language : str = Language .HTML ,
0 commit comments