transformer
transformer copied to clipboard
Plugin hook for final text
In some cases it is useful to access the literal text that is about to be output by transformer, rather than accessing the AST.
This could of course be done in post-processing step, but integrating it all into transformer is nice for useability.
Some use cases:
- Apply code formatting (e.g. Black)
- ~~Add any code that is separate from the actual requests (e.g. event handler registration this could be done using regular hooks, but it is complex)~~ (solved this case using OpaqueBlock)
I can probably implement this myself, as just another plugin hook, called with the complete text just before output. If it sounds good to you @thilp
Because I found OpaqueBlock this just fell way down my prio list :) (so I wont start working on it myself)