Wexus2 0.20
|
#include <MarkDown.h>
Public Types | |
enum | { Format_Lists = 1, Format_Quotes = 2, Format_Links = 4, Format_Titles = 8, Format_None = 0, Format_Basic = Format_Lists|Format_Quotes, Format_BlogPost = 0x7F, Format_Comment = Format_Basic, Format_WikiPage = Format_BlogPost } |
Static Public Member Functions | |
static QByteArray | process (const QByteArray &markdown, int flags=Format_Basic) |
static HTMLString | title (const QByteArray &markdown) |
static HTMLString | firstPara (const QByteArray &markdown) |
A Markdown like formatter.
This needs work. Currently supports:
*bold* _italics_ =title= [wikilink] [[reallink]] *list item
static HTMLString wexus::MarkDown::firstPara | ( | const QByteArray & | markdown | ) | [static] |
Returns the first paragraph, already rendered as an HTML string from the givenmarkdown code.
static QByteArray wexus::MarkDown::process | ( | const QByteArray & | markdown, |
int | flags = Format_Basic |
||
) | [static] |
Format the given markdown code as HTML markup.
As flags, either choose Format_Basic, Format_Post Format_Wiki, or if you want total controler, the indiviual type flags.
static HTMLString wexus::MarkDown::title | ( | const QByteArray & | markdown | ) | [static] |
Returns the title, already rendered as an HTML string from the givenmarkdown code.