wiki.techinc.nl/includes/parser
C. Scott Ananian ad89079a44 Avoid counting input lines twice in BlockLevelPass::execute()
In T208070 / I120ca25a77b7b933de4afddd1d458e36a95e26da we added a
check whether we were processing the last line of input, in order
to avoid emitting extra trailing newlines.  But if the number of
input lines is large, StringUtils::explode() will return an
iterator which doesn't implement Countable for efficiency.
I22eebb70af1b19d7c25241fc78bfcced4470e78a fixed this, but at the
cost of scanning the string twice: once just to count the number
of newlines before we begin to iterate over the lines.

This patch uses Iterator::valid() to determine if we're on the
last iteration without having to scan the string twice.

Bug: T208070
Bug: T218817
Change-Id: I41a45266d266195aa6002d3854e018cacf052ca6
2019-03-20 17:35:14 -04:00
..
BlockLevelPass.php Avoid counting input lines twice in BlockLevelPass::execute() 2019-03-20 17:35:14 -04:00
CacheTime.php
CoreParserFunctions.php Remove comments literally repeating the next line of code 2019-02-27 17:28:40 +00:00
CoreTagHooks.php
DateFormatter.php
LinkHolderArray.php Various fixes for phan-taint-check 2019-02-17 11:41:11 +00:00
MWTidy.php Remove most support for configuring Tidy, including Raggett 2018-11-15 12:22:06 -05:00
Parser.php Remove $wgMediaInTargetLanguage 2019-03-08 15:24:39 -08:00
ParserCache.php Avoid using outdated $casToken field for BagOStuff calls 2019-03-11 23:39:29 -07:00
ParserDiffTest.php
ParserFactory.php
ParserOptions.php Remove deprecated ParserOutput::legacyOptions 2019-03-11 22:50:47 -07:00
ParserOutput.php Use short assignment operator in PHP 2019-03-07 09:55:49 +01:00
Preprocessor.php
Preprocessor_DOM.php Safe replacement of a lot of !count() with === [] 2019-01-15 17:28:49 +01:00
Preprocessor_Hash.php
RemexStripTagHandler.php Improve RemexStripTagHandler working with tables 2019-03-14 13:11:59 -07:00
Sanitizer.php Sanitizer: remove deprecated parameter to escapeIdReferenceList() 2019-02-21 20:12:22 -08:00
StripState.php