WICKET-7036: MarkupFactory supports IMarkupFilters#564
WICKET-7036: MarkupFactory supports IMarkupFilters#564hosea wants to merge 2 commits intoapache:wicket-9.xfrom
Conversation
| return Application.get().getMarkupSettings().getMarkupFactory(); | ||
| } | ||
|
|
||
| private final LinkedHashMap<IMarkupFilter, Class<? extends IMarkupFilter>> additionalMarkupFilters = new LinkedHashMap<>(); |
There was a problem hiding this comment.
IMO it would be better to change private final LinkedHashMap -> private final Map
|
Is this really necessary? The Javadoc for * MarkupParser's can be extended by means of {@link IMarkupFilter}. You can add your own filter
* as follows:
*
* <pre>
* public MyMarkupFactory {
* ...
* public MarkupParser newMarkupParser(final MarkupResourceStream resource) {
* MarkupParser parser = super.newMarkupParser(resource);
* parser.add(new MyFilter());
* return parser;
* }
* }
* </pre> |
|
I agree with @theigl that one could easily extend MarkupFactory and achieve the requirement. |
|
I agree with you, that one could easily extend MarkupFactory and achieve the requirement. That's in fact, what we do now. I just want to explain, why it would be helpful to have such an extension: |
|
Thanks for the explanation, @hosea ! I can see how the code in this PR would help for your case! How about adding these new methods to |
Wicket-7036: Support IMarkupFilters within MarkupFactory.