d25c6d80c6
Instead of passing clones of context and the markdown tree to postprocessors, pass them a mutable reference which may be modified in-place. This is a breaking change to the postprocessor implementation, changing both the input arguments as well as the return value: ```diff - dyn Fn(Context, MarkdownEvents) -> (Context, MarkdownEvents, PostprocessorResult) + Send + Sync; + dyn Fn(&mut Context, &mut MarkdownEvents) -> PostprocessorResult + Send + Sync; ``` With this change the postprocessor API becomes a little more ergonomic to use however, especially making the intent around return statements more clear. |
||
---|---|---|
.. | ||
testdata | ||
export_test.rs | ||
postprocessors_test.rs |