public class ParagraphBlockParser extends java.lang.Object implements BlockParser
ParagraphBlockParser class.
| Modifier and Type | Field and Description |
|---|---|
private BlockParser[] |
parsers |
| Constructor and Description |
|---|
ParagraphBlockParser(BlockParser[] parsers)
Constructor for ParagraphBlockParser.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(java.lang.String line,
ByLineSource source)
accept.
|
private java.lang.String |
appendUntilEmptyLine(java.lang.String line,
ByLineSource source)
Slurp lines from the source starting with the given line appending them together into a StringBuilder until an
empty line is reached, and while the source contains more lines.
|
Block |
visit(java.lang.String line,
ByLineSource source)
visit.
|
Block |
visit(java.lang.String line,
ByLineSource source,
boolean generateParagraphTags)
Visit the Block.
|
private BlockParser[] parsers
public ParagraphBlockParser(BlockParser[] parsers)
Constructor for ParagraphBlockParser.
parsers - the parsers.public boolean accept(java.lang.String line,
ByLineSource source)
accept in interface BlockParserline - the line.source - the source.public Block visit(java.lang.String line, ByLineSource source, boolean generateParagraphTags) throws ParseException
line - the line to visit.source - the source.generateParagraphTags - whether to generate a paragraph.ParseException - if anypublic Block visit(java.lang.String line, ByLineSource source) throws ParseException
visit in interface BlockParserline - the line.source - the source.ParseException - if any.private java.lang.String appendUntilEmptyLine(java.lang.String line,
ByLineSource source)
throws ParseException
#getBlocks(String) method.line - the first linesource - the source to read new lines fromParseException