We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48bf38f commit 9d0d488Copy full SHA for 9d0d488
src/parsers/jsonld-parser.js
@@ -7,7 +7,8 @@ export default function (html, config = {}) {
7
8
$html('script[type="application/ld+json"]').each((index, item) => {
9
try {
10
- let parsedJSON = JSON.parse($(item).text())
+ const json = item.children[0].data.replace(/;$/, '')
11
+ let parsedJSON = JSON.parse(json)
12
if (!Array.isArray(parsedJSON)) {
13
parsedJSON = [parsedJSON]
14
}
0 commit comments