Introduction
Introduction Statistics Contact Development Disclaimer Help
<hr /> is now more proper. - smu - smu - simple markup (Markdown) processor (fo…
git clone git://git.codemadness.org/smu
Log
Files
Refs
README
LICENSE
---
commit 44bcd35d56ff5bc59e6ef554298efe49b1237b45
parent f6967fe5819b82c722fe4270c55f1ea1cb9c7fae
Author: [email protected] <[email protected]>
Date: Mon, 14 Jan 2008 13:52:56 +0100
<hr /> is now more proper.
Diffstat:
M smu.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/smu.c b/smu.c
@@ -50,8 +50,8 @@ void hprint(const char *begin, const char *end); /* es…
void process(const char *begin, const char *end, int isblock);
/* Processes range bet…
-Parser parsers[] = { doreplace, dounderline, dohtml, dolineprefix, dolist, dop…
- dogtlt, dosurround, dolink, doshortlink, doamp };
+Parser parsers[] = { dounderline, dohtml, dolineprefix, dolist, doparagraph,
+ dogtlt, dosurround, dolink, doshortlink, doamp, doreplace };
/* list of parsers */
FILE *source;
unsigned int nohtml = 0;
@@ -175,12 +175,16 @@ dolineprefix(const char *begin, const char *end, int newb…
continue;
if(strncmp(lineprefix[i].search, p, l))
continue;
+ if(*begin == '\n')
+ fputc('\n', stdout);
+ fputs(lineprefix[i].before, stdout);
+ if(lineprefix[i].search[l-1] == '\n') {
+ fputc('\n', stdout);
+ return l;
+ }
if(!(buffer = malloc(BUFFERSIZE)))
eprint("Malloc failed.");
buffer[0] = '\0';
- if(*begin == '\n')
- fputs("\n", stdout);
- fputs(lineprefix[i].before, stdout);
for(j = 0, p += l; p < end; p++, j++) {
ADDC(buffer, j) = *p;
if(*p == '\n' && p + l < end) {
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.