dj_angles.replacers.comments

Module Contents

dj_angles.replacers.comments.mask_comments(html: str, initial_tag_regex: str = '(dj-)') tuple[str, list[str]]

Mask Django and custom comments in the HTML string.

Parameters:
  • html – The HTML string to process.

  • initial_tag_regex – The regex for the tag prefix.

Returns:

A tuple containing the masked HTML string and a list of original comments.