Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minify content within script tag of type="application/ld+json" #1157

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

simonewebdesign
Copy link

Resolves #1132

// Try parsing and re-stringifying the JSON
return JSON.stringify(JSON.parse(text));
}
catch (e) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to log the error instead of suppressing it? Similar to what is done here: https://github.com/kangax/html-minifier/blob/ab4c9d6e3e11ab207f545728c918895d5cb4c5f8/src/htmlminifier.js#L740C11-L740C28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Any plans to minify content within script tag of type="application/ld+json"?
2 participants