X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=parser.c;h=1ff125c69775ca61ce981e10f5216a26ed7fbff3;hb=d2546ae4a3dc3424f9357aea800880b0dd49486f;hp=8489ab03372e16c387846d3d6947a585e2b4823f;hpb=c5507e522967fc93ceba3f73aa086ab1b62303ae;p=smdp.git diff --git a/parser.c b/parser.c index 8489ab0..1ff125c 100644 --- a/parser.c +++ b/parser.c @@ -53,9 +53,15 @@ deck_t *markdown_load(FILE *input) { // markdown analyse bits = markdown_analyse(text); + // if first line in file is markdown hr + if(!line && CHECK_BIT(bits, IS_HR)) { + + // clear text + (text->reset)(text); + // if text is markdown hr - if(CHECK_BIT(bits, IS_HR) && - CHECK_BIT(line->bits, IS_EMPTY)) { + } else if(CHECK_BIT(bits, IS_HR) && + CHECK_BIT(line->bits, IS_EMPTY)) { slide->lines = lc;