Introduction
Introduction Statistics Contact Development Disclaimer Help
dogtlt filled - smu - smu - simple markup (Markdown) processor (fork, fixes + f…
git clone git://git.codemadness.org/smu
Log
Files
Refs
README
LICENSE
---
commit 1d7d3a4598596f6387cf7407c42265591d838ea4
parent 44bcd35d56ff5bc59e6ef554298efe49b1237b45
Author: [email protected] <[email protected]>
Date: Mon, 14 Jan 2008 14:19:29 +0100
dogtlt filled
Diffstat:
M smu.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/smu.c b/smu.c
@@ -127,6 +127,23 @@ doamp(const char *begin, const char *end, int newblock) {
unsigned int
dogtlt(const char *begin, const char *end, int newblock) {
+ int brpos;
+ char c;
+
+ if(nohtml || begin + 1 >= end)
+ return 0;
+ brpos = begin[1] == '>';
+ if(!brpos && *begin != '<')
+ return 0;
+ c = begin[brpos ? 0 : 1];
+ if(!brpos && (c < 'a' || c > 'z') && (c < 'A' || c > 'Z')) {
+ fputs("&lt;",stdout);
+ return 1;
+ }
+ else if(brpos && (c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && !strc…
+ printf("%c&gt;",c);
+ return 2;
+ }
return 0;
}
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.