Introduction
Introduction Statistics Contact Development Disclaimer Help
Removed comments and unneeded replace rules ('- - -' should be readded later.) …
git clone git://git.codemadness.org/smu
Log
Files
Refs
README
LICENSE
---
commit a2af303ce18a69a8e1aa9a8b9ecdb451380c6689
parent b8d1753e0945ca028ba52908ae8354d5ebf0763b
Author: [email protected] <[email protected]>
Date: Fri, 4 Jan 2008 12:04:15 +0100
Removed comments and unneeded replace rules ('- - -' should be readded later.)
Diffstat:
M smu.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 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[] = { dounderline, dohtml, dolineprefix, dolist, doparagraph,
- dogtlt, dosurround, dolink, doshortlink, doamp, doreplace };
+Parser parsers[] = { doreplace, dounderline, dohtml, dolineprefix, dolist, dop…
+ dogtlt, dosurround, dolink, doshortlink, doamp };
/* list of parsers */
FILE *source;
unsigned int nohtml = 0;
@@ -79,16 +79,6 @@ struct Tag surround[] = {
{ "_", 1, "<em>", "</em>" },
};
char * replace[][2] = {
- { "\n- - -\n", "\n<hr />\n" },
- { "\n- - - \n", "\n<hr />\n" },
- { " ######\n", "\n" },
- { " #####\n", "\n" },
- { " ####\n", "\n" },
- { " ###\n", "\n" },
- { " ##\n", "\n" },
- { " #\n", "\n" },
- { " >", "&gt;" },
- { "< ", "&lt;" },
{ "\\\\", "\\" },
{ "\\`", "`" },
{ "\\*", "*" },
@@ -126,7 +116,6 @@ doamp(const char *begin, const char *end, int newblock) {
if(*begin != '&')
return 0;
if(!nohtml) {
- /* TODO: end ? */
for(p = begin + 1; p != end && !strchr("; \\\n\t", *p); p++);
if(p == end || *p == ';')
return 0;
@@ -144,7 +133,6 @@ unsigned int
dohtml(const char *begin, const char *end, int newblock) {
const char *p, *tag, *tagend;
- /* TODO: end */
if(nohtml || !newblock || *begin == '\n' || begin + 2 >= end)
return 0;
p = begin;
@@ -309,7 +297,6 @@ dolist(const char *begin, const char *end, int newblock) {
else
j = 0;
}
- /* TODO: do '\t' properly */
if(q + indent < end)
for(; (q[j] == ' ' || q[j] == '\t') &&…
if(j == indent) {
@@ -343,7 +330,6 @@ doparagraph(const char *begin, const char *end, int newbloc…
if(!newblock)
return 0;
- /* TODO: can go past end */
p = strstr(begin, "\n\n");
if(!p || p > end)
p = 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.