Class MarkdownLinePrefixAnnotation

  • All Implemented Interfaces:
    Cloneable, IAnnotation

    public class MarkdownLinePrefixAnnotation
    extends Object
    implements IAnnotation
    ListItem and BlockQuote, which can be nested, and IndentedCode block (cannot be nested) are marked by prefixes on each line, and they can be combined. This annotation keeps track of the prefix that is currently in effect. Here are some examples:
    • "Normal" No block quote or indented code block; linePrefix=""
    • "> foo" Block quote; "> "
    • "> > foo" Nested block quote, "> > "
    • "> >foo" Nested block quote, and a space is omitted; "> > " (normalized)
    • " public void foo()" Indented code block; " "
    • "> public void foo();" Indented code block inside a block quote; "> " (1+4 spaces, the first space being part of the block quote marker
    • "> 1. item 1", List item that is block quoted; "> " (3 spaces added in preparation to handle sub list items)
    • Constructor Detail

      • MarkdownLinePrefixAnnotation

        public MarkdownLinePrefixAnnotation​(String linePrefix)
    • Method Detail

      • getLinePrefix

        public String getLinePrefix()
      • toString

        public String toString()
        Description copied from interface: IAnnotation
        Gets a human readable representation of this annotation.
        Specified by:
        toString in interface IAnnotation
        Overrides:
        toString in class Object
        Returns:
        a human readable representation of this annotation.