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

Made regex quantifier lazy to resolve #381 #1349

Merged
merged 2 commits into from
Jan 2, 2024

Conversation

Balearica
Copy link
Contributor

What kind of change does this PR introduce?
As noted by #381, adding large base64-encoded images produces an error. This happens because the file format ("image/png", "image/jpeg", etc.) is matched with the infamous .* pattern, which matches the entire string (before backtracking). This change makes it lazy.

Checklist:

  • Unit Tests
  • Documentation
  • Update CHANGELOG.md
  • Ready to be merged

@rohinthr
Copy link

Any updates for this PR?

@Balearica
Copy link
Contributor Author

@liborm85 Can you (or another maintainer) review and merge this PR? This change is extremely simple conceptually, and resolves a frustrating error multiple users have encountered (see #381).

@rohinthr rohinthr mentioned this pull request Jan 2, 2024
@blikblum blikblum merged commit 2d5b416 into foliojs:master Jan 2, 2024
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.

None yet

3 participants