We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7a8759 commit 3c0665eCopy full SHA for 3c0665e
extruct/jsonld.py
@@ -10,7 +10,6 @@
10
11
from extruct.utils import parse_html
12
13
-HTML_OR_JS_COMMENTLINE = re.compile(r'^\s*(//.*|<!--.*-->)')
14
15
16
class JsonLdExtractor(object):
@@ -34,8 +33,7 @@ def _extract_items(self, node):
34
33
data = json.loads(script, strict=False)
35
except ValueError:
36
# sometimes JSON-decoding errors are due to leading HTML or JavaScript comments
37
- data = jstyleson.loads(
38
- HTML_OR_JS_COMMENTLINE.sub('', script), strict=False)
+ data = jstyleson.loads(script, strict=False)
39
if isinstance(data, list):
40
return data
41
elif isinstance(data, dict):
0 commit comments