hr works again. It's a little hacky :/ - smu - smu - simple markup (Markdown) p… | |
git clone git://git.codemadness.org/smu | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 9bb4f5d434e82d31fdc2d95450f0727ec64be214 | |
parent a2af303ce18a69a8e1aa9a8b9ecdb451380c6689 | |
Author: [email protected] <[email protected]> | |
Date: Sat, 5 Jan 2008 22:55:48 +0100 | |
hr works again. | |
It's a little hacky :/ | |
Diffstat: | |
M smu.c | 5 +++-- | |
1 file changed, 3 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/smu.c b/smu.c | |
@@ -65,6 +65,7 @@ struct Tag lineprefix[] = { | |
{ "### ", 1, "<h3>", "</h3>" }, | |
{ "## ", 1, "<h2>", "</h2>" }, | |
{ "# ", 1, "<h1>", "</h1>" }, | |
+ { "- - -\n", 1, "<hr />", ""}, | |
}; | |
struct Tag underline[] = { | |
{ "=", 1, "<h1>", "</h1>\n" }, | |
@@ -275,7 +276,7 @@ dolist(const char *begin, const char *end, int newblock) { | |
for(; p < end && run; p++) { | |
for(i = 0; p < end && run; p++, i++) { | |
if(*p == '\n') { | |
- if(p + 1 >= end) | |
+ if(p + 1 == end) | |
break; | |
else if(p[1] == '\n') { | |
p++; | |
@@ -498,7 +499,7 @@ process(const char *begin, const char *end, int newblock) { | |
p += abs(affected); | |
if(!affected) { | |
if(nohtml) | |
- hprint(p, p+1); | |
+ hprint(p, p + 1); | |
else | |
putchar(*p); | |
p++; |