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