Class ParagraphBlockParser
java.lang.Object
org.apache.maven.doxia.module.confluence.parser.ParagraphBlockParser
- All Implemented Interfaces:
BlockParser
ParagraphBlockParser class.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionParagraphBlockParser(BlockParser[] parsers) Constructor for ParagraphBlockParser. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(String line, ByLineSource source) accept.private StringappendUntilEmptyLine(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.visit(String line, ByLineSource source) visit.visit(String line, ByLineSource source, boolean generateParagraphTags) Visit the Block.
-
Field Details
-
parsers
-
-
Constructor Details
-
ParagraphBlockParser
Constructor for ParagraphBlockParser.
- Parameters:
parsers- the parsers.
-
-
Method Details
-
accept
accept.- Specified by:
acceptin interfaceBlockParser- Parameters:
line- the line.source- the source.- Returns:
- boolean true if valid.
-
visit
public Block visit(String line, ByLineSource source, boolean generateParagraphTags) throws ParseException Visit the Block.- Parameters:
line- the line to visit.source- the source.generateParagraphTags- whether to generate a paragraph.- Returns:
- the visited Block.
- Throws:
ParseException- if any.
-
visit
visit.- Specified by:
visitin interfaceBlockParser- Parameters:
line- the line.source- the source.- Returns:
- boolean true if valid.
- Throws:
ParseException- if any.
-
appendUntilEmptyLine
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. The result can be passed to themethod.invalid reference
#getBlocks(String)- Parameters:
line- the first linesource- the source to read new lines from- Returns:
- a StringBuilder appended with lines
- Throws:
ParseException
-