-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: wrong renderer used due to memoization
When a document is printed multiple times, memoization is reused, as intended. However, these printing could be done with different renderers. Prior this commit, the memoization also remembers the renderer that was used. Therefore, subsequent printing could use a stale, memoized renderer. This commit fixes the issue by threading the renderer through the layout function, so that it becomes "stateless" and can be memoized with no stale state saving. Fixes #2
- Loading branch information
Showing
3 changed files
with
31 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters