pinosaur
/
smdp.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bdd16c7
)
fixed segv if first line of file is HR, closes #27
author
Michael Göhler
<somebody.here@gmx.de>
Fri, 19 Sep 2014 20:45:35 +0000
(22:45 +0200)
committer
Michael Göhler
<somebody.here@gmx.de>
Fri, 19 Sep 2014 20:45:35 +0000
(22:45 +0200)
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
8489ab0
..
1ff125c
100644
(file)
--- 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;