Status & Roadmap
Authors & License
Funding U++
Search on this site

SourceForge.net Logo

SourceForge.net Logo

GitHub Logo

Discord Logo



class MarkdownConverter

Converts a markdown formatted text into qtf formatted text.


Public Method List


MarkdownConverter& CollapseWhitespaces(bool b = true)

Collapses non-trivial whitespaces in main text into single space (' ') character. Returns *this for method chaining.



MarkdownConverter& NoIndentedCodeblocks(bool b = true)

Disable indented code blocks. (Only fenced code works.) Returns *this for method chaining.



MarkdownConverter& Tables(bool b = true)

Enables tables. Returns *this for method chaining.



MarkdownConverter& WikiLinks(bool b = true)

Enables wikilinks. Returns *this for method chaining.



MarkdownConverter& Strikeout(bool b = true)

Enables strikedout text. Returns *this for method chaining.



MarkdownConverter& Underline(bool b = true)

Enables underlined text. Returns *this for method chaining.



MarkdownConverter& NoHtmlBlocks(bool b = true)

Disables raw html blocks. Returns *this for method chaining.



MarkdownConverter& NoHtmlSpans(bool b = true)

Disables inline raw html text. Returns *this for method chaining.



MarkdownConverter& NoHtml(bool b = true)

Disables both raw html blocks and inline raw html text. Returns *this for method chaining.



MarkdownConverter& PermissiveAtxHeaders(bool b = true)

Do not require space in ATX headers (e.g ###header). Returns *this for method chaining.



MarkdownConverter& PermissiveUrlAutolinks(bool b = true)

Allows URLs as autolinks even without '<', '>'. Returns *this for method chaining.



MarkdownConverter& PermissiveWWWAutolinks(bool b = true)

Enables www autolinks (even without any scheme prefix, if they begin with 'www'.) Returns *this for method chaining.



MarkdownConverter& PermissiveEmailAutolinks(bool b = true)

Recognize e-mails as autolinks even without '<', '>' and 'mailto:'



MarkdownConverter& PermissiveAutolinks(bool b = true)

Enables or disables permissive autolink parsing as a whole. Returns *this for method chaining.



MarkdownConverter& CommonMarkDialect()

This is the default dialect of MarkdownConverter. Returns *this for method chaining.



MarkdownConverter& GitHubDialect()

Enables GitHub's markdown dialect. Returns *this for method chaining.



String ToQtf(const String& markdown_text)

Attempts to convert the markdown_text into a qtf text. The markdown text has to be a valid UTF-8 string. Returns the qtf formatted text on success or a void String on failure.



EventVectorMap<String, String>& > WhenImages

This event is dispatched when the markdown text contains valid image spans. Client is presented with a string map of key-value pairs. The keys of this map will be the URLs of images to be rendered. Note that the URLs may contain relative addresses or they may point to local sources. Client can render the images, convert them to valid qtf strings and set the values of these keys to these strings. If the map values are left empty or nullified, however, then the resulting span may be converted into qtf as a hyperlink, plain text, or it can be completely discarded, depending on the enabled markdown extensions or selected dialect.


Constructor detail



Default constructor.



Do you want to contribute?