dogtlt filled
This commit is contained in:
parent
44bcd35d56
commit
1d7d3a4598
1 changed files with 17 additions and 0 deletions
17
smu.c
17
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("<",stdout);
|
||||
return 1;
|
||||
}
|
||||
else if(brpos && (c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && !strchr("/\"'",c)) {
|
||||
printf("%c>",c);
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue