MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / strip_comments

Function strip_comments

javascript/private/closure_make_deps.py:37–41  ·  view source on GitHub ↗

Remove JS comments so regexes don't match goog.require() in documentation.

(content)

Source from the content-addressed store, hash-verified

35
36
37def strip_comments(content):
38 """Remove JS comments so regexes don't match goog.require() in documentation."""
39 content = re.sub(r"/\*.*?\*/", "", content, flags=re.DOTALL)
40 content = re.sub(r"//[^\n]*", "", content)
41 return content
42
43
44def parse_js_file(path):

Callers 1

parse_js_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected