mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Reduce indentation in HTMLparser.c
No functional change.
This commit is contained in:
26
HTMLparser.c
26
HTMLparser.c
@ -4378,11 +4378,12 @@ htmlParseContent(htmlParserCtxtPtr ctxt) {
|
|||||||
* Handle SCRIPT/STYLE separately
|
* Handle SCRIPT/STYLE separately
|
||||||
*/
|
*/
|
||||||
htmlParseScript(ctxt);
|
htmlParseScript(ctxt);
|
||||||
} else {
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sometimes DOCTYPE arrives in the middle of the document
|
* 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(2) == 'D') && (UPP(3) == 'O') &&
|
||||||
(UPP(4) == 'C') && (UPP(5) == 'T') &&
|
(UPP(4) == 'C') && (UPP(5) == 'T') &&
|
||||||
(UPP(6) == 'Y') && (UPP(7) == 'P') &&
|
(UPP(6) == 'Y') && (UPP(7) == 'P') &&
|
||||||
@ -4396,7 +4397,7 @@ htmlParseContent(htmlParserCtxtPtr ctxt) {
|
|||||||
/*
|
/*
|
||||||
* First case : a comment
|
* First case : a comment
|
||||||
*/
|
*/
|
||||||
if ((CUR == '<') && (NXT(1) == '!') &&
|
else if ((CUR == '<') && (NXT(1) == '!') &&
|
||||||
(NXT(2) == '-') && (NXT(3) == '-')) {
|
(NXT(2) == '-') && (NXT(3) == '-')) {
|
||||||
htmlParseComment(ctxt);
|
htmlParseComment(ctxt);
|
||||||
}
|
}
|
||||||
@ -4443,7 +4444,6 @@ htmlParseContent(htmlParserCtxtPtr ctxt) {
|
|||||||
else {
|
else {
|
||||||
htmlParseCharData(ctxt);
|
htmlParseCharData(ctxt);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
GROW;
|
GROW;
|
||||||
}
|
}
|
||||||
if (currentNode != NULL) xmlFree(currentNode);
|
if (currentNode != NULL) xmlFree(currentNode);
|
||||||
@ -4783,11 +4783,12 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) {
|
|||||||
* Handle SCRIPT/STYLE separately
|
* Handle SCRIPT/STYLE separately
|
||||||
*/
|
*/
|
||||||
htmlParseScript(ctxt);
|
htmlParseScript(ctxt);
|
||||||
} else {
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sometimes DOCTYPE arrives in the middle of the document
|
* 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(2) == 'D') && (UPP(3) == 'O') &&
|
||||||
(UPP(4) == 'C') && (UPP(5) == 'T') &&
|
(UPP(4) == 'C') && (UPP(5) == 'T') &&
|
||||||
(UPP(6) == 'Y') && (UPP(7) == 'P') &&
|
(UPP(6) == 'Y') && (UPP(7) == 'P') &&
|
||||||
@ -4801,7 +4802,7 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) {
|
|||||||
/*
|
/*
|
||||||
* First case : a comment
|
* First case : a comment
|
||||||
*/
|
*/
|
||||||
if ((CUR == '<') && (NXT(1) == '!') &&
|
else if ((CUR == '<') && (NXT(1) == '!') &&
|
||||||
(NXT(2) == '-') && (NXT(3) == '-')) {
|
(NXT(2) == '-') && (NXT(3) == '-')) {
|
||||||
htmlParseComment(ctxt);
|
htmlParseComment(ctxt);
|
||||||
}
|
}
|
||||||
@ -4852,7 +4853,6 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) {
|
|||||||
else {
|
else {
|
||||||
htmlParseCharData(ctxt);
|
htmlParseCharData(ctxt);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
GROW;
|
GROW;
|
||||||
}
|
}
|
||||||
if (currentNode != NULL) xmlFree(currentNode);
|
if (currentNode != NULL) xmlFree(currentNode);
|
||||||
@ -5949,15 +5949,14 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else if ((cur == '<') && (next == '!') &&
|
||||||
/*
|
|
||||||
* Sometimes DOCTYPE arrives in the middle of the document
|
|
||||||
*/
|
|
||||||
if ((cur == '<') && (next == '!') &&
|
|
||||||
(UPP(2) == 'D') && (UPP(3) == 'O') &&
|
(UPP(2) == 'D') && (UPP(3) == 'O') &&
|
||||||
(UPP(4) == 'C') && (UPP(5) == 'T') &&
|
(UPP(4) == 'C') && (UPP(5) == 'T') &&
|
||||||
(UPP(6) == 'Y') && (UPP(7) == 'P') &&
|
(UPP(6) == 'Y') && (UPP(7) == 'P') &&
|
||||||
(UPP(8) == 'E')) {
|
(UPP(8) == 'E')) {
|
||||||
|
/*
|
||||||
|
* Sometimes DOCTYPE arrives in the middle of the document
|
||||||
|
*/
|
||||||
if ((!terminate) &&
|
if ((!terminate) &&
|
||||||
(htmlParseLookupSequence(ctxt, '>', 0, 0, 1) < 0))
|
(htmlParseLookupSequence(ctxt, '>', 0, 0, 1) < 0))
|
||||||
goto done;
|
goto done;
|
||||||
@ -6036,7 +6035,6 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||||||
cur = in->cur[0];
|
cur = in->cur[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user