MarkdownMinifier Class
- Namespace
- Kampute.DocToolkit.IO.Minifiers
- Assembly
- Kampute.DocToolkit.dll
Definition
A TextWriter that wraps another TextWriter to output well-formed Markdown content, minifying it by eliminating superfluous whitespace while preserving whitespace within code blocks to maintain the intended formatting.
public class MarkdownMinifier : WrappedTextWriter- Inheritance
- object
- MarshalByRefObject
- TextWriter
- WrappedTextWriter
- MarkdownMinifier
Remarks
Thread Safety
Public static members of the type are guaranteed to be thread-safe. However, public instance members are not thread-safe.
Constructors
| MarkdownMinifier(TextWriter, bool) | Initializes a new instance of the MarkdownMinifier class. |
Methods
| Write(char) | Writes a character to the text stream, if it is not redundant. |

Whitespace is kept as written within fenced code blocks and within indented code blocks. An indented code block starts with a line that is indented by four or more columns, where a tab counts as four columns, and follows a blank line. Indented lines within a list are treated as continuations of the list items rather than as code, so code blocks nested inside list items are minified like other content.