1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 20:25:14 +03:00

Reduce indentation in HTMLparser.c

No functional change.
This commit is contained in:
Nick Wellnhofer 2022-07-15 13:26:41 +02:00
parent 39745c927a
commit 6722d22c88

View File

@ -4378,11 +4378,12 @@ htmlParseContent(htmlParserCtxtPtr ctxt) {
* Handle SCRIPT/STYLE separately
*/
htmlParseScript(ctxt);
} else {
}
/*
* Sometimes DOCTYPE arrives in the middle of the document
*/
if ((CUR == '<') && (NXT(1) == '!') &&
else if ((CUR == '<') && (NXT(1) == '!') &&
(UPP(2) == 'D') && (UPP(3) == 'O') &&
(UPP(4) == 'C') && (UPP(5) == 'T') &&
(UPP(6) == 'Y') && (UPP(7) == 'P') &&
@ -4396,7 +4397,7 @@ htmlParseContent(htmlParserCtxtPtr ctxt) {
/*
* First case : a comment
*/
if ((CUR == '<') && (NXT(1) == '!') &&
else if ((CUR == '<') && (NXT(1) == '!') &&
(NXT(2) == '-') && (NXT(3) == '-')) {
htmlParseComment(ctxt);
}
@ -4443,7 +4444,6 @@ htmlParseContent(htmlParserCtxtPtr ctxt) {
else {
htmlParseCharData(ctxt);
}
}
GROW;
}
if (currentNode != NULL) xmlFree(currentNode);
@ -4783,11 +4783,12 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) {
* Handle SCRIPT/STYLE separately
*/
htmlParseScript(ctxt);
} else {
}
/*
* Sometimes DOCTYPE arrives in the middle of the document
*/
if ((CUR == '<') && (NXT(1) == '!') &&
else if ((CUR == '<') && (NXT(1) == '!') &&
(UPP(2) == 'D') && (UPP(3) == 'O') &&
(UPP(4) == 'C') && (UPP(5) == 'T') &&
(UPP(6) == 'Y') && (UPP(7) == 'P') &&
@ -4801,7 +4802,7 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) {
/*
* First case : a comment
*/
if ((CUR == '<') && (NXT(1) == '!') &&
else if ((CUR == '<') && (NXT(1) == '!') &&
(NXT(2) == '-') && (NXT(3) == '-')) {
htmlParseComment(ctxt);
}
@ -4852,7 +4853,6 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) {
else {
htmlParseCharData(ctxt);
}
}
GROW;
}
if (currentNode != NULL) xmlFree(currentNode);
@ -5949,15 +5949,14 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
#endif
break;
}
} else {
/*
* Sometimes DOCTYPE arrives in the middle of the document
*/
if ((cur == '<') && (next == '!') &&
} else if ((cur == '<') && (next == '!') &&
(UPP(2) == 'D') && (UPP(3) == 'O') &&
(UPP(4) == 'C') && (UPP(5) == 'T') &&
(UPP(6) == 'Y') && (UPP(7) == 'P') &&
(UPP(8) == 'E')) {
/*
* Sometimes DOCTYPE arrives in the middle of the document
*/
if ((!terminate) &&
(htmlParseLookupSequence(ctxt, '>', 0, 0, 1) < 0))
goto done;
@ -6036,7 +6035,6 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
cur = in->cur[0];
}
}
}
break;
}