Closed notalex closed 5 years ago
Outstanding!
The ?>
token is the closing delimiter of an XML "processing instruction", which is also recognized and tolerated by HTML parsers. Counting it as HTML was correct.
@craigbarnes Thank you for your input. Acknowledging that ?>
is valid HTML, ohcount was flagging it as HTML instead of PHP in PHP source code. The intent of this change was to ensure that PHP code was correctly counted.
There may be a new issue that when ?>
is found in HTML, it is not being recognized, but we do not have any reports of that. Do you have a solution to the issue that the PHP code was being misclassified as HTML?
The tests show that ohcount returns
>
instead of?>
. We haven't been able to fix this. However the line still counts as php, which serves our purpose.