Remove JS comments so regexes don't match goog.require() in documentation.
(content)
| 35 | |
| 36 | |
| 37 | def 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 | |
| 44 | def parse_js_file(path): |