Package net.sf.okapi.filters.markdown
Class MarkdownLinePrefixAnnotation
- java.lang.Object
-
- net.sf.okapi.filters.markdown.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 Summary
Constructors Constructor Description MarkdownLinePrefixAnnotation(String linePrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLinePrefix()StringtoString()Gets a human readable representation of this annotation.
-
-
-
Constructor Detail
-
MarkdownLinePrefixAnnotation
public MarkdownLinePrefixAnnotation(String linePrefix)
-
-
Method Detail
-
getLinePrefix
public String getLinePrefix()
-
toString
public String toString()
Description copied from interface:IAnnotationGets a human readable representation of this annotation.- Specified by:
toStringin interfaceIAnnotation- Overrides:
toStringin classObject- Returns:
- a human readable representation of this annotation.
-
-