RemexHtml does not mangle tabs, so we don't need to armor them! We'll
now output literal tab characters, so this does change the HTML output,
but does not have any visual change.
Depends-On: Idf246d05d116f63a73105b50a1929a7721fbe7b9
Change-Id: I2ba871acf9ff5fdc81c13e03eee3a8fe670e1f0f
The $wgUseTidy global has been soft-deprecated since MW 1.26, which is
when MWTidy::isEnabled() was added. This extension currently requires
MediaWiki >= 1.32 according to extension.json.
Change-Id: Ie30c9174e6e3b60bce5a692296a9de1e30192e2c
wfMakeStaticArrayFile() expects an associative array, so let's take this
opportunity to turn the lexer list into one with true as the value. This
allows us to use isset() instead of the slower in_array() when checking
to see if a lexer is known.
Bug: T200626
Change-Id: I7a852ddbcfa7c8ed19ac933205cabd176b20d0cb
* Use backend-specific makeGlobalKey() method instead of
deprecated wfGlobalCacheKey().
* Call makeCacheKey() inline and reduce to only producing
part of the key (makeCacheKeyHash).
* Add a $ttl (1 month), instead of the previously unspecified
expiry (default: indefinite).
Change-Id: I913a768a3b61cc31ce14fa086a563ceecca7c603
The recursive call is somewhat counter-intuitive, and seems like it could
easily break if forgotten. Instead, move the part that we want to re-use
out into its own method.
Change-Id: I64ced0da211155299744d3c86f7818e751ad027e
* Move "empty tag" case to earlier in highlight() by comparing to
empty string without strlen(). Follows-up cda15b184.
* Turn "shell disabled" case into 'elseif' after length check,
instead of subsequent 'if'. That way, in case of a too large
string, we don't need to check if shell is disabled, and it
also provides the user with the size-related error instead of
the shell-related one.
* Add a few clarifying code comments.
Change-Id: Ib0ef9e683ac4aadd0461fe061ddbe9bfb0a27a82