Package org.commonmark.internal
Class Bracket
- java.lang.Object
-
- org.commonmark.internal.Bracket
-
public class Bracket extends java.lang.Object
Opening bracket for links ([
), images (![
), or links with other markers.
-
-
Field Summary
Fields Modifier and Type Field Description boolean
allowed
Whether this bracket is allowed to form a link/image (also known as "active").boolean
bracketAfter
Whether there is an unescaped bracket (opening or closing) after this opening bracket in the text parsed so far.Text
bracketNode
The node of[
.Position
bracketPosition
The position of[
.Position
contentPosition
The position of the content (after the opening bracket)Text
markerNode
The node of a marker such as!
if present, null otherwise.Position
markerPosition
The position of the marker if present, null otherwise.Bracket
previous
Previous bracket.Delimiter
previousDelimiter
Previous delimiter (emphasis, etc) before this bracket.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Bracket
link(Text bracketNode, Position bracketPosition, Position contentPosition, Bracket previous, Delimiter previousDelimiter)
static Bracket
withMarker(Text markerNode, Position markerPosition, Text bracketNode, Position bracketPosition, Position contentPosition, Bracket previous, Delimiter previousDelimiter)
-
-
-
Field Detail
-
markerNode
public final Text markerNode
The node of a marker such as!
if present, null otherwise.
-
markerPosition
public final Position markerPosition
The position of the marker if present, null otherwise.
-
bracketNode
public final Text bracketNode
The node of[
.
-
bracketPosition
public final Position bracketPosition
The position of[
.
-
contentPosition
public final Position contentPosition
The position of the content (after the opening bracket)
-
previous
public final Bracket previous
Previous bracket.
-
previousDelimiter
public final Delimiter previousDelimiter
Previous delimiter (emphasis, etc) before this bracket.
-
allowed
public boolean allowed
Whether this bracket is allowed to form a link/image (also known as "active").
-
bracketAfter
public boolean bracketAfter
Whether there is an unescaped bracket (opening or closing) after this opening bracket in the text parsed so far.
-
-