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 |
getMinLength()
Minimum number of delimiter characters that are needed to activate this.
|
char |
getOpeningCharacter() |
int |
process(DelimiterRun openingRun,
DelimiterRun closingRun)
Process the delimiter runs.
|
char getOpeningCharacter()
char getClosingCharacter()
int getMinLength()
int process(DelimiterRun openingRun, DelimiterRun closingRun)
The processor can examine the runs and the nodes and decide if it wants to process or not. If not, it should not change any nodes and return 0. If yes, it should do the processing (wrapping nodes, etc) and then return how many delimiters were used.
Note that removal (unlinking) of the used delimiter Text nodes is done by the caller.
openingRun - the opening delimiter runclosingRun - the closing delimiter runCopyright © 2021. All rights reserved.