@Override protected void doProcess( final ITemplateContext context, final ICDATASection cdataSection, final ICDATASectionStructureHandler structureHandler) { final IInliner inliner = context.getInliner(); if (inliner == null || inliner == NoOpInliner.INSTANCE) { return; } final CharSequence inlined = inliner.inline(context, cdataSection); if (inlined != null && inlined != cdataSection) { structureHandler.setContent(inlined); } }
@Override protected void doProcess( final ITemplateContext context, final IComment comment, final ICommentStructureHandler structureHandler) { final IInliner inliner = context.getInliner(); if (inliner == null || inliner == NoOpInliner.INSTANCE) { return; } final CharSequence inlined = inliner.inline(context, comment); if (inlined != null && inlined != comment) { structureHandler.setContent(inlined); } }
@Override protected void doProcess( final ITemplateContext context, final IText text, final ITextStructureHandler structureHandler) { if (EngineEventUtils.isWhitespace(text)) { // Fail fast - a whitespace text is never inlineable. And templates tend to have a lot of white space blocks // NOTE we are not using isInlineable() here because before doing so the template mode would have to be // checked (so that th:inline works alright). But white spaces are a safe bet. return; } final IInliner inliner = context.getInliner(); if (inliner == null || inliner == NoOpInliner.INSTANCE) { return; } final CharSequence inlined = inliner.inline(context, text); if (inlined != null && inlined != text) { structureHandler.setText(inlined); } }