com.atlassian.renderer.v2.components
Class HtmlEntityRendererComponent
java.lang.Object
com.atlassian.renderer.v2.components.AbstractRendererComponent
com.atlassian.renderer.v2.components.AbstractRegexRendererComponent
com.atlassian.renderer.v2.components.HtmlEntityRendererComponent
- All Implemented Interfaces:
- RendererComponent
public class HtmlEntityRendererComponent
- extends AbstractRegexRendererComponent
Html entities such as , &, … (
) etc, don't actually need to be transformed
to html, since they are already html, but tokenising them early means that nothing else can accidentally
corrupt them, and we don't need insanely complex regular expressions elsewhere to avoid that corruption.
|
Method Summary |
void |
appendSubstitution(java.lang.StringBuffer buffer,
RenderContext context,
java.util.regex.Matcher matcher)
Create an inline token for the matched entity and substitute it. |
java.lang.String |
render(java.lang.String wiki,
RenderContext context)
Render this piece of wiki text. |
boolean |
shouldRender(RenderMode renderMode)
Whether or not this render component is required given the current render mode. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HTML_ENTITY_PATTERN
public static final java.util.regex.Pattern HTML_ENTITY_PATTERN
HtmlEntityRendererComponent
public HtmlEntityRendererComponent()
shouldRender
public boolean shouldRender(RenderMode renderMode)
- Description copied from interface:
RendererComponent
- Whether or not this render component is required given the current render mode.
- Specified by:
shouldRender in interface RendererComponent- Specified by:
shouldRender in class AbstractRegexRendererComponent
render
public java.lang.String render(java.lang.String wiki,
RenderContext context)
- Description copied from interface:
RendererComponent
- Render this piece of wiki text.
- Specified by:
render in interface RendererComponent- Specified by:
render in class AbstractRegexRendererComponent
appendSubstitution
public void appendSubstitution(java.lang.StringBuffer buffer,
RenderContext context,
java.util.regex.Matcher matcher)
- Create an inline token for the matched entity and substitute it.
- Specified by:
appendSubstitution in class AbstractRegexRendererComponent
Copyright © 2012 Atlassian. All Rights Reserved.