Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Make it easier to extend ToHtmlSerializer #26
Similar to #21 - toHtmlSerialzer is difficult to subclass and tweak behaviour.
I would like to modify the link URLs before they are written (in my case I want to resolve relative image URLs)
I can do this by overriding toHtmlSerializer but I have to override all of the link methods, some are complicated and I end up having to repeat the base class code (public void visit(final RefLinkNode node) in particular).
Maybe some of the code in this class could be broken down with more overridable template method hooks so subclasses can change the functionality more easily?
Also some variables like printer as private which make overriding and tweaking the behaviour difficult.