| java.lang.Object com.ecyrd.jspwiki.parser.MarkupParser
All known Subclasses: com.ecyrd.jspwiki.parser.JSPWikiMarkupParser,
MarkupParser | abstract public class MarkupParser (Code) | | Provides an abstract class for the parser instances.
author: Janne Jalkanen since: 2.4 |
LEGACY_CHARS_ALLOWED | final protected static String LEGACY_CHARS_ALLOWED(Code) | | Lists all punctuation characters allowed in WikiMarkup. These
will not be cleaned away. This is for compatibility for older versions
of JSPWiki.
|
PROP_ALLOWHTML | final public static String PROP_ALLOWHTML(Code) | | If set to "true", allows using raw HTML within Wiki text. Be warned,
this is a VERY dangerous option to set - never turn this on in a publicly
allowable Wiki, unless you are absolutely certain of what you're doing.
|
PROP_RUNPLUGINS | final public static String PROP_RUNPLUGINS(Code) | | If set to "true", enables plugins during parsing
|
PUNCTUATION_CHARS_ALLOWED | final public static String PUNCTUATION_CHARS_ALLOWED(Code) | | Lists all punctuation characters allowed in page names.
|
PUSHBACK_BUFFER_SIZE | final protected static int PUSHBACK_BUFFER_SIZE(Code) | | Allow this many characters to be pushed back in the stream. In effect,
this limits the size of a single line.
|
m_attachmentLinkMutatorChain | protected ArrayList m_attachmentLinkMutatorChain(Code) | | |
m_externalLinkMutatorChain | protected ArrayList m_externalLinkMutatorChain(Code) | | |
m_inlineImages | protected boolean m_inlineImages(Code) | | |
m_localLinkMutatorChain | protected ArrayList m_localLinkMutatorChain(Code) | | Optionally stores internal wikilinks
|
m_parseAccessRules | protected boolean m_parseAccessRules(Code) | | |
addAttachmentLinkHook | public void addAttachmentLinkHook(StringTransmutator mutator)(Code) | | Adds a hook for processing attachment links.
Parameters: mutator - The hook to call. Null is safe. |
addExternalLinkHook | public void addExternalLinkHook(StringTransmutator mutator)(Code) | | Adds a hook for processing external links. This includes
all http:// ftp://, etc. links, including inlined images.
Parameters: mutator - The hook to call. Null is safe. |
addLinkTransmutator | public void addLinkTransmutator(StringTransmutator mutator)(Code) | | Adds a hook for processing link texts. This hook is called
when the link text is written into the output stream, and
you may use it to modify the text. It does not affect the
actual link, only the user-visible text.
Parameters: mutator - The hook to call. Null is safe. |
addLocalLinkHook | public void addLocalLinkHook(StringTransmutator mutator)(Code) | | Adds a hook for processing local links. The engine
transforms both non-existing and existing page links.
Parameters: mutator - The hook to call. Null is safe. |
cleanLink | public static String cleanLink(String link)(Code) | | Cleans a Wiki name. The functionality of this method was changed in 2.6
so that the list of allowed characters is much larger. Use wikifyLink()
to get the legacy behaviour.
[ This is a link ] -> This is a link
Parameters: link - Link to be cleared. Null is safe, and causes this to return null. A cleaned link. since: 2.0 |
cleanLink | public static String cleanLink(String link, String allowedChars)(Code) | | Cleans a Wiki name based on a list of characters. Also, any multiple
whitespace is collapsed into a single space, and any leading or trailing
space is removed.
Parameters: link - Link to be cleared. Null is safe, and causes this to return null. Parameters: allowedChars - Characters which are allowed in the string. A cleaned link. since: 2.6 |
disableAccessRules | public void disableAccessRules()(Code) | | |
enableImageInlining | public void enableImageInlining(boolean toggle)(Code) | | Use this to turn on or off image inlining.
Parameters: toggle - If true, images are inlined (as per set in jspwiki.properties)If false, then images won't be inlined; instead, they will betreated as standard hyperlinks. since: 2.2.9 |
getPosition | public int getPosition()(Code) | | Return the current position in the reader stream.
The value will be -1 prior to reading.
the reader position as an int. |
nextToken | final protected int nextToken() throws IOException(Code) | | Returns the next token in the stream. This is the most called method
in the entire parser, so it needs to be lean and mean.
The next token in the stream; or, if the stream is ended, -1. throws: IOException - If something bad happens throws: NullPointerException - If you have not yet created an input document. |
pushBack | protected void pushBack(int c) throws IOException(Code) | | Push back any character to the current input. Does not
push back a read EOF, though.
|
setInputReader | public Reader setInputReader(Reader in)(Code) | | Replaces the current input character stream with a new one.
Parameters: in - New source for input. If null, this method does nothing. the old stream |
wikifyLink | public static String wikifyLink(String link)(Code) | | Cleans away extra legacy characters. This method functions exactly
like pre-2.6 cleanLink()
[ This is a link ] -> ThisIsALink
Parameters: link - Link to be cleared. Null is safe, and causes this to return null. A cleaned link. since: 2.6 |
|
|