public class Block extends Object
| Modifier and Type | Field and Description |
|---|---|
Block |
blocks
Head and tail of child blocks.
|
Block |
blockTail
Head and tail of child blocks.
|
int |
hlDepth
Depth of headline BlockType.
|
String |
id
ID for headlines and list items
|
Line |
lines
Head and tail of linked lines.
|
Line |
lineTail
Head and tail of linked lines.
|
String |
meta
Block meta information
|
Block |
next
Next block.
|
BlockType |
type
This block's type.
|
| Constructor and Description |
|---|
Block()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendLine(Line line)
Appends the given line to this block.
|
void |
expandListParagraphs()
Changes all Blocks of type
NONE to PARAGRAPH if
this Block is a List and any of the ListItems contains a paragraph. |
boolean |
hasLines() |
void |
removeBlockQuotePrefix()
Used for nested block quotes.
|
boolean |
removeLeadingEmptyLines()
Removes leading empty lines.
|
void |
removeLine(Line line)
Removes the given line from this block.
|
void |
removeListIndent(Configuration configuration)
Used for nested lists.
|
void |
removeSurroundingEmptyLines()
Removes leading and trailing empty lines.
|
void |
removeTrailingEmptyLines()
Removes trailing empty lines.
|
Block |
split(Line line)
Splits this block's lines, creating a new child block having 'line' as
it's lineTail.
|
void |
transfromHeadline()
Sets
hlDepth and takes care of '#' chars. |
public BlockType type
public Line lines
public Line lineTail
public Block blocks
public Block blockTail
public Block next
public int hlDepth
public String id
public String meta
public boolean hasLines()
true if this block contains lines.public void removeSurroundingEmptyLines()
public void transfromHeadline()
hlDepth and takes care of '#' chars.public void removeListIndent(Configuration configuration)
configuration - txtmark configurationpublic void removeBlockQuotePrefix()
public boolean removeLeadingEmptyLines()
true if an empty line was removed.public void removeTrailingEmptyLines()
public Block split(Line line)
line - The line to split from.public void removeLine(Line line)
line - Line to remove.public void appendLine(Line line)
line - Line to append.public void expandListParagraphs()
NONE to PARAGRAPH if
this Block is a List and any of the ListItems contains a paragraph.Copyright © 2016. All Rights Reserved.