dogtlt filled - smu - smu - simple markup (Markdown) processor (fork, fixes + features)
 (HTM) git clone git://git.codemadness.org/smu
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 1d7d3a4598596f6387cf7407c42265591d838ea4
 (DIR) parent 44bcd35d56ff5bc59e6ef554298efe49b1237b45
 (HTM) Author: gottox@rootkit.lan <gottox@rootkit.lan>
       Date:   Mon, 14 Jan 2008 14:19:29 +0100
       
       dogtlt filled
       
       Diffstat:
         M smu.c                               |      17 +++++++++++++++++
       
       1 file changed, 17 insertions(+), 0 deletions(-)
       ---
 (DIR) 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') && !strchr("/\"'",c)) {
       +                printf("%c&gt;",c);
       +                return 2;
       +        }
                return 0;
        }