| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private int | |
| private final Appendable | |
| private char | |
| private final LinkedList | |
| private final LinkedList | |
| private final LinkedList |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | |
| private void | flushBlockSeparator()
If a block separator has been enqueued with |
| public char | |
| public boolean | isAtLineStart()
Returns: whether we're at the line start (not counting any prefixes), i.e. after a |
| private boolean | |
| public void | |
| private boolean | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | pushRawEscape(CharMatcher
the characters to escape in raw text rawEscape)Escape the characters matching the supplied matcher, in all text (text and raw). |
| public void | |
| public void | |
| public void | |
| private boolean | |
| public void | text(String
the string to write s, CharMatcher which characters to escape escape)Write the supplied string with escaping. |
| private void | |
| private void | |
| public void | |
| private void |
| atLineStart | back to summary |
|---|---|
| private boolean atLineStart | |
| blockSeparator | back to summary |
|---|---|
| private int blockSeparator | |
| buffer | back to summary |
|---|---|
| private final Appendable buffer | |
| lastChar | back to summary |
|---|---|
| private char lastChar | |
| prefixes | back to summary |
|---|---|
| private final LinkedList<String> prefixes | |
| rawEscapes | back to summary |
|---|---|
| private final LinkedList<CharMatcher> rawEscapes | |
| tight | back to summary |
|---|---|
| private final LinkedList<Boolean> tight | |
| MarkdownWriter | back to summary |
|---|---|
| public MarkdownWriter(Appendable out) | |
| append | back to summary |
|---|---|
| private void append(char c, CharMatcher escape) throws IOException | |
| block | back to summary |
|---|---|
| public void block() Enqueue a block separator to be written before the next text is written. Block separators are not written straight away because if there are no more blocks to write we don't want a separator (at the end of the document). | |
| flushBlockSeparator | back to summary |
|---|---|
| private void flushBlockSeparator() If a block separator has been enqueued with | |
| getLastChar | back to summary |
|---|---|
public char getLastChar()
| |
| isAtLineStart | back to summary |
|---|---|
| public boolean isAtLineStart() | |
| isTight | back to summary |
|---|---|
| private boolean isTight() | |
| line | back to summary |
|---|---|
| public void line() Write a newline (line terminator). | |
| needsEscaping | back to summary |
|---|---|
| private boolean needsEscaping(char c, CharMatcher escape) | |
| popPrefix | back to summary |
|---|---|
| public void popPrefix() Remove the last prefix from the top of the stack. | |
| popRawEscape | back to summary |
|---|---|
| public void popRawEscape() Remove the last raw escape from the top of the stack. | |
| popTight | back to summary |
|---|---|
| public void popTight() Remove the last "tight" setting from the top of the stack. | |
| pushPrefix | back to summary |
|---|---|
| public void pushPrefix(String prefix) Push a prefix onto the top of the stack. All prefixes are written at the beginning of each line, until the prefix is popped again.
| |
| pushRawEscape | back to summary |
|---|---|
| public void pushRawEscape(CharMatcher rawEscape) Escape the characters matching the supplied matcher, in all text (text and raw). This might be useful to extensions that add another layer of syntax, e.g. the tables extension that uses `|` to separate cells and needs all `|` characters to be escaped (even in code spans).
| |
| pushTight | back to summary |
|---|---|
| public void pushTight(boolean tight) Change whether blocks are tight or loose. Loose is the default where blocks are separated by a blank line. Tight is where blocks are not separated by a blank line. Tight blocks are used in lists, if there are no blank lines within the list.
Note that changing this does not affect block separators that have already been enqueued with | |
| raw | back to summary |
|---|---|
| public void raw(String s) Write the supplied string (raw/unescaped except if | |
| raw | back to summary |
|---|---|
| public void raw(char c) Write the supplied character (raw/unescaped except if | |
| rawNeedsEscaping | back to summary |
|---|---|
| private boolean rawNeedsEscaping(char c) | |
| text | back to summary |
|---|---|
| public void text(String s, CharMatcher escape) Write the supplied string with escaping.
| |
| write | back to summary |
|---|---|
| private void write(String s, CharMatcher escape) | |
| write | back to summary |
|---|---|
| private void write(char c) | |
| writePrefix | back to summary |
|---|---|
| public void writePrefix(String prefix) Write a prefix.
| |
| writePrefixes | back to summary |
|---|---|
| private void writePrefixes() | |