public interface DelimiterProcessor
_ and *.
Note that implementations of this need to be thread-safe, the same instance may be used by multiple parsers.
| Modifier and Type | Method and Description |
|---|---|
char |
getClosingCharacter() |
int |
getDelimiterUse(DelimiterRun opener,
DelimiterRun closer)
Determine how many (if any) of the delimiter characters should be used.
|
int |
getMinLength()
Minimum number of delimiter characters that are needed to activate this.
|
char |
getOpeningCharacter() |
void |
process(Text opener,
Text closer,
int delimiterUse)
Process the matched delimiters, e.g.
|
char getOpeningCharacter()
char getClosingCharacter()
int getMinLength()
int getDelimiterUse(DelimiterRun opener, DelimiterRun closer)
This allows implementations to decide how many characters to use based on the properties of the delimiter runs. An implementation can also return 0 when it doesn't want to allow this particular combination of delimiter runs.
opener - the opening delimiter runcloser - the closing delimiter runvoid process(Text opener, Text closer, int delimiterUse)
Note that removal of the delimiter from the delimiter nodes and unlinking them is done by the caller.
opener - the text node that contained the opening delimitercloser - the text node that contained the closing delimiterdelimiterUse - the number of delimiters that were usedCopyright © 2016 Atlassian. All rights reserved.