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

Add the option {generateGraph: false} #41

Merged
merged 1 commit into from
Sep 25, 2024
Merged

Add the option {generateGraph: false} #41

merged 1 commit into from
Sep 25, 2024

Conversation

lairez
Copy link
Contributor

@lairez lairez commented Sep 25, 2024

The option generateGraph (default: true) generates some graph information with every bibliography item. When dealing with large bib files (1MB in my case), this causes a crash in citeproc-js, precisely here:
https://github.com/Juris-M/citeproc-js/blob/57e3584632fe44db410da1771c4b6bd69fe729f9/src/build.js#L553

The function retrieveItem makes all bib items go through JSON.stringify and JSON.parse. JSON.stringify crashes on big inputs.

Therefore, it is better to use {generateGraph: false}, I don't think we loose any feature as far as rehype-citation is concerned.

The option generateGraph (default: true) generates some graph
information with every bibliography item. When dealing with large bib
files (1MB in my case), this causes a crash in citeproc-js, precisely
here:
https://github.com/Juris-M/citeproc-js/blob/57e3584632fe44db410da1771c4b6bd69fe729f9/src/build.js#L553

The function retrieveItem makes all bib items go through JSON.stringify
and JSON.parse. JSON.stringify crashes on big inputs.

Therefore, it is better to use {generateGraph: false}, I don't think we
loose any feature as far as rehype-citation is concerned.
Copy link

netlify bot commented Sep 25, 2024

Deploy Preview for rehype-citation ready!

Name Link
🔨 Latest commit 0e76a87
🔍 Latest deploy log https://app.netlify.com/sites/rehype-citation/deploys/66f40e5eb485c80008eb754d
😎 Deploy Preview https://deploy-preview-41--rehype-citation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@timlrx
Copy link
Owner

timlrx commented Sep 25, 2024

Makes sense to me, thanks

@timlrx timlrx merged commit 70a0aa7 into timlrx:main Sep 25, 2024
6 checks passed
@timlrx
Copy link
Owner

timlrx commented Sep 25, 2024

@lairez published fix as v2.1.2

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.

2 participants