mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-21 04:41:52 +00:00
fix tag parsing with missing >
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@898 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
d3ca9a2e9d
commit
3c78149f48
2 changed files with 1887 additions and 1843 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -837,6 +837,12 @@ RX_DATA [-a-zA-Z0-9_]+
|
|||
RETURN(T_ELEMENT_END);
|
||||
}
|
||||
|
||||
<S_TAGEND2>[^<]+ {
|
||||
UPDATE_BUFPOS;
|
||||
UPDATE_COLUMN;
|
||||
APPEND_TO_TMP(yyleng);
|
||||
}
|
||||
|
||||
<S_TAGEND2><{RX_WHITE_SPACE}*\/{RX_WHITE_SPACE}*/[A-Za-z] {
|
||||
UPDATE_BUFPOS;
|
||||
UPDATE_LINE;
|
||||
|
|
@ -859,8 +865,7 @@ RX_DATA [-a-zA-Z0-9_]+
|
|||
}
|
||||
|
||||
<S_TAGEND2>. {
|
||||
UPDATE_BUFPOS;
|
||||
UPDATE_LINE;
|
||||
return T_WAIT;
|
||||
}
|
||||
|
||||
/*********************** TEXT ************************/
|
||||
|
|
@ -909,16 +914,13 @@ int htmllexDebug (void** scanner, int debug) {
|
|||
/* prepare scanner for calls to yylex() */
|
||||
int htmllexStart (void* scanner, UserData* data, const char* s, int slen) {
|
||||
/* append s to data buffer and scan those bytes.
|
||||
As Flex does not distinguish between '\0' and EOF characters,
|
||||
we must replace '\0' with ' '. */
|
||||
As Flex does not distinguish between NUL and EOF characters,
|
||||
we must replace NUL with ' '. */
|
||||
int len = strlen(data->buf);
|
||||
int i;
|
||||
RESIZE_BUF(data->buf, len+slen+1);
|
||||
for (i=0; i<slen; i++) {
|
||||
if (s[i]=='\0')
|
||||
data->buf[len+i] = ' ';
|
||||
else
|
||||
data->buf[len+i] = s[i];
|
||||
data->buf[len+i] = (s[i]==0 ? ' ' : s[i]);
|
||||
}
|
||||
data->buf[len+slen] = '\0';
|
||||
if (len > data->bufpos) {
|
||||
|
|
@ -931,7 +933,9 @@ int htmllexStart (void* scanner, UserData* data, const char* s, int slen) {
|
|||
data->exc_type = NULL;
|
||||
data->exc_val = NULL;
|
||||
data->exc_tb = NULL;
|
||||
/*fprintf(stderr, "SCANNING '%s'\n", data->buf+len);*/
|
||||
if (yyget_debug(scanner)) {
|
||||
fprintf(stderr, "SCANNING `%s'\n", data->buf+len);
|
||||
}
|
||||
data->lexbuf = yy_scan_bytes(data->buf+len, slen, scanner);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue