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 TypeMethodDescriptionboolean
accept
(String line, ByLineSource source) accept.private String
appendUntilEmptyLine
(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:
accept
in 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:
visit
in 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 the#getBlocks(String)
method.- Parameters:
line
- the first linesource
- the source to read new lines from- Returns:
- a StringBuilder appended with lines
- Throws:
ParseException
-