MCPcopy
hub / github.com/django/django / get_comment_blocks

Method get_comment_blocks

django/contrib/staticfiles/storage.py:213–218  ·  view source on GitHub ↗

Return a list of (start, end) tuples for each comment block.

(self, content, include_line_comments=False)

Source from the content-addressed store, hash-verified

211 return self._url(self.stored_name, name, force)
212
213 def get_comment_blocks(self, content, include_line_comments=False):
214 """
215 Return a list of (start, end) tuples for each comment block.
216 """
217 pattern = line_comment_re if include_line_comments else comment_re
218 return [(match.start(), match.end()) for match in re.finditer(pattern, content)]
219
220 def is_in_comment(self, pos, comments):
221 for start, end in comments:

Callers 1

_post_processMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected