Skip to content

Commit

Permalink
Merge pull request #336 from orta/master
Browse files Browse the repository at this point in the history
Use Github Flavoured Markdown as default markdown renderer
  • Loading branch information
tomaz committed Mar 9, 2013
2 parents c16d267 + 5af6835 commit 81cf405
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Application/GBApplicationSettingsProvider.m
Expand Up @@ -233,7 +233,7 @@ - (NSString *)stringByConvertingMarkdownToHTML:(NSString *)markdown {
const char* input=[markdown cStringUsingEncoding:NSUTF8StringEncoding];

if(input) {
MMIOT *document = mkd_string((char *)input, (int)strlen(input), 0);
MMIOT *document = gfm_string((char *)input, (int)strlen(input), 0);
mkd_compile(document, 0);

char *html = NULL;
Expand Down
9 changes: 8 additions & 1 deletion Libraries/Discount/mkdio.h
Expand Up @@ -12,6 +12,11 @@ typedef unsigned int mkd_flag_t;
MMIOT *mkd_in(FILE*,mkd_flag_t); /* assemble input from a file */
MMIOT *mkd_string(const char*,int,mkd_flag_t); /* assemble input from a buffer */

/* line builder for github flavoured markdown
*/
MMIOT *gfm_in(FILE*,mkd_flag_t); /* assemble input from a file */
MMIOT *gfm_string(const char*,int,mkd_flag_t); /* assemble input from a buffer */

void mkd_basename(MMIOT*,char*);

void mkd_initialize();
Expand Down Expand Up @@ -82,8 +87,9 @@ void mkd_ref_prefix(MMIOT*, char*);
#define MKD_NOHTML 0x00000008 /* don't allow raw html through AT ALL */
#define MKD_STRICT 0x00000010 /* disable SUPERSCRIPT, RELAXED_EMPHASIS */
#define MKD_TAGTEXT 0x00000020 /* process text inside an html tag; no
* <em>, no <bold>, no html or [] expansion */
* <em>, no <bold>, no html or [] expansion */
#define MKD_NO_EXT 0x00000040 /* don't allow pseudo-protocols */
#define MKD_NOEXT MKD_NO_EXT /* ^^^ (aliased for user convenience) */
#define MKD_CDATA 0x00000080 /* generate code for xml ![CDATA[...]] */
#define MKD_NOSUPERSCRIPT 0x00000100 /* no A^B */
#define MKD_NORELAXED 0x00000200 /* emphasis happens /everywhere/ */
Expand All @@ -99,6 +105,7 @@ void mkd_ref_prefix(MMIOT*, char*);
#define MKD_NOALPHALIST 0x00080000 /* forbid alphabetic lists */
#define MKD_NODLIST 0x00100000 /* forbid definition lists */
#define MKD_EXTRA_FOOTNOTE 0x00200000 /* enable markdown extra-style footnotes */
#define MKD_NOSTYLE 0x00400000 /* don't extract <style> blocks */
#define MKD_EMBED MKD_NOLINKS|MKD_NOIMAGE|MKD_TAGTEXT

/* special flags for mkd_in() and mkd_string()
Expand Down
Binary file modified Libraries/libmarkdown.a
Binary file not shown.

0 comments on commit 81cf405

Please sign in to comment.