diff options
| -rw-r--r-- | libmat2/web.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmat2/web.py b/libmat2/web.py index 13d5fc8..a31c7ca 100644 --- a/libmat2/web.py +++ b/libmat2/web.py | |||
| @@ -14,7 +14,7 @@ class CSSParser(abstract.AbstractParser): | |||
| 14 | 14 | ||
| 15 | def remove_all(self) -> bool: | 15 | def remove_all(self) -> bool: |
| 16 | with open(self.filename, encoding='utf-8') as f: | 16 | with open(self.filename, encoding='utf-8') as f: |
| 17 | cleaned = re.sub(r'/\*.+?\*/', '', f.read(), 0, self.flags) | 17 | cleaned = re.sub(r'/\*.*?\*/', '', f.read(), 0, self.flags) |
| 18 | with open(self.output_filename, 'w', encoding='utf-8') as f: | 18 | with open(self.output_filename, 'w', encoding='utf-8') as f: |
| 19 | f.write(cleaned) | 19 | f.write(cleaned) |
| 20 | return True | 20 | return True |
| @@ -22,7 +22,7 @@ class CSSParser(abstract.AbstractParser): | |||
| 22 | def get_meta(self) -> Dict[str, Any]: | 22 | def get_meta(self) -> Dict[str, Any]: |
| 23 | metadata = {} | 23 | metadata = {} |
| 24 | with open(self.filename, encoding='utf-8') as f: | 24 | with open(self.filename, encoding='utf-8') as f: |
| 25 | cssdoc = re.findall(r'/\*(.+?)\*/', f.read(), self.flags) | 25 | cssdoc = re.findall(r'/\*(.*?)\*/', f.read(), self.flags) |
| 26 | for match in cssdoc: | 26 | for match in cssdoc: |
| 27 | for line in match.splitlines(): | 27 | for line in match.splitlines(): |
| 28 | try: | 28 | try: |
