Add support for passing an extra env dictionary to the MarkdownSerializer #98
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is useful for serialization rules that need additional data or configuration that isn't part of the document.
Why not just have your serializer functions close over the data they need?
I don't want to create a new instance of MarkdownSerializer for each parse
cycle.
בתאריך יום ד׳, 17 במאי 2023, 10:58, מאת Marijn Haverbeke <
@.***>:
Wouldn't you have to do the same if you pass in the env as an object?
I only need to create the env object and pass it to
serialize, reusing the same globalMarkdownSerializer.Ah, I see, it's an argument to
serialize. Still, this seems to address a highly specific use case that's easily enough worked around by putting the values you need to access in some shared variable, so I don't think this needs to be in the library.