<hr /> is now more proper.
This commit is contained in:
parent
f6967fe581
commit
44bcd35d56
1 changed files with 9 additions and 5 deletions
14
smu.c
14
smu.c
|
@ -50,8 +50,8 @@ void hprint(const char *begin, const char *end); /* escapes HTML and prints it t
|
||||||
void process(const char *begin, const char *end, int isblock);
|
void process(const char *begin, const char *end, int isblock);
|
||||||
/* Processes range between begin and end. */
|
/* Processes range between begin and end. */
|
||||||
|
|
||||||
Parser parsers[] = { doreplace, dounderline, dohtml, dolineprefix, dolist, doparagraph,
|
Parser parsers[] = { dounderline, dohtml, dolineprefix, dolist, doparagraph,
|
||||||
dogtlt, dosurround, dolink, doshortlink, doamp };
|
dogtlt, dosurround, dolink, doshortlink, doamp, doreplace };
|
||||||
/* list of parsers */
|
/* list of parsers */
|
||||||
FILE *source;
|
FILE *source;
|
||||||
unsigned int nohtml = 0;
|
unsigned int nohtml = 0;
|
||||||
|
@ -175,12 +175,16 @@ dolineprefix(const char *begin, const char *end, int newblock) {
|
||||||
continue;
|
continue;
|
||||||
if(strncmp(lineprefix[i].search, p, l))
|
if(strncmp(lineprefix[i].search, p, l))
|
||||||
continue;
|
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)))
|
if(!(buffer = malloc(BUFFERSIZE)))
|
||||||
eprint("Malloc failed.");
|
eprint("Malloc failed.");
|
||||||
buffer[0] = '\0';
|
buffer[0] = '\0';
|
||||||
if(*begin == '\n')
|
|
||||||
fputs("\n", stdout);
|
|
||||||
fputs(lineprefix[i].before, stdout);
|
|
||||||
for(j = 0, p += l; p < end; p++, j++) {
|
for(j = 0, p += l; p < end; p++, j++) {
|
||||||
ADDC(buffer, j) = *p;
|
ADDC(buffer, j) = *p;
|
||||||
if(*p == '\n' && p + l < end) {
|
if(*p == '\n' && p + l < end) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue