Skip to content

Commit

Permalink
use github flavoured markdown as default
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Mar 9, 2013
1 parent c16d267 commit 5af6835
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]; const char* input=[markdown cStringUsingEncoding:NSUTF8StringEncoding];


if(input) { 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); mkd_compile(document, 0);


char *html = NULL; 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_in(FILE*,mkd_flag_t); /* assemble input from a file */
MMIOT *mkd_string(const char*,int,mkd_flag_t); /* assemble input from a buffer */ 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_basename(MMIOT*,char*);


void mkd_initialize(); 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_NOHTML 0x00000008 /* don't allow raw html through AT ALL */
#define MKD_STRICT 0x00000010 /* disable SUPERSCRIPT, RELAXED_EMPHASIS */ #define MKD_STRICT 0x00000010 /* disable SUPERSCRIPT, RELAXED_EMPHASIS */
#define MKD_TAGTEXT 0x00000020 /* process text inside an html tag; no #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_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_CDATA 0x00000080 /* generate code for xml ![CDATA[...]] */
#define MKD_NOSUPERSCRIPT 0x00000100 /* no A^B */ #define MKD_NOSUPERSCRIPT 0x00000100 /* no A^B */
#define MKD_NORELAXED 0x00000200 /* emphasis happens /everywhere/ */ #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_NOALPHALIST 0x00080000 /* forbid alphabetic lists */
#define MKD_NODLIST 0x00100000 /* forbid definition lists */ #define MKD_NODLIST 0x00100000 /* forbid definition lists */
#define MKD_EXTRA_FOOTNOTE 0x00200000 /* enable markdown extra-style footnotes */ #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 #define MKD_EMBED MKD_NOLINKS|MKD_NOIMAGE|MKD_TAGTEXT


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

0 comments on commit 5af6835

Please sign in to comment.