From f0f8ef5ecdf8dbc5fd68857da7faec646c009c5c Mon Sep 17 00:00:00 2001 From: david parsons Date: Sun, 27 Apr 2008 06:43:08 -0700 Subject: [PATCH] Bugfix: always compile isdefinition(), but if dl lists are not defined, #ifdef it to return 0 (bug reported by Mark Raddatz.) --- markdown.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/markdown.c b/markdown.c index 15df42a..70fe35d 100644 --- a/markdown.c +++ b/markdown.c @@ -331,18 +331,20 @@ ishdr(Line *t, int *htyp) } -#if DL_TAG_EXTENSION static int isdefinition(Line *t) { +#if DL_TAG_EXTENSION return t && t->next && (S(t->text) > 2) && (t->dle == 0) && (T(t->text)[0] == '=') && (T(t->text)[S(t->text)-1] == '=') && ( (t->next->dle >= 4) || isdefinition(t->next) ); -} +#else + return 0; #endif +} static int @@ -354,12 +356,10 @@ islist(Line *t, int *trim) if ( iscode(t) || blankline(t) || ishdr(t,&i) || ishr(t) ) return 0; -#if DL_TAG_EXTENSION if ( isdefinition(t) ) { *trim = 4; return DL; } -#endif if ( strchr("*-+", T(t->text)[t->dle]) && isspace(T(t->text)[t->dle+1]) ) { i = nextnonblank(t, t->dle+1);