mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-31 19:30:21 +02:00
[2.0.1] Rewire line numbering so that if it's null it's autodetected based on error collection. also, update TODO.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1237 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -44,6 +44,13 @@ class HTMLPurifier_Lexer_DirectLex extends HTMLPurifier_Lexer
|
||||
$array = array(); // result array
|
||||
|
||||
$maintain_line_numbers = $config->get('Core', 'MaintainLineNumbers');
|
||||
|
||||
if ($maintain_line_numbers === null) {
|
||||
// automatically determine line numbering by checking
|
||||
// if error collection is on
|
||||
$maintain_line_numbers = $config->get('Core', 'CollectErrors');
|
||||
}
|
||||
|
||||
if ($maintain_line_numbers) $current_line = 1;
|
||||
else $current_line = false;
|
||||
$context->register('CurrentLine', $current_line);
|
||||
|
Reference in New Issue
Block a user