Remove use of deprecated MWTidy::isEnabled() and internal
MWTidy::singleton() methods. See I3584181070da7ed4888beaaf04e083114aca1eab
for context.
Bug: T198214
Change-Id: I511068cc7b2398773a837f66e08def206cbb5626
By turning the (?:…) into (?=…) they become lookaheads and are not
part of the returned string in $tail any more. This is exactly what we
want here. All we want is to *know* if the dot, question or exclamation
mark is followed by a space. But we don't need the space captured.
Change-Id: I4be715c4c084165e5ab25da77609f12ffce4d385
I argue that the code fixing unclosed HTML tags is – even if optional –
an integral part of the code that potentially breaks these HTML tags in
the first place. Notice how much code disappears in the ApiQueryExtracts
class.
Additionally, the new approach uses an interface instead of a static
function call that is impossible to mock and hard to test.
Change-Id: Ic1a65995f4dba11d060a8738d642905cbfc79271
This is a straightforward baseline patch that does nothing but moving
existing code around, without touching it. I'm not even trying to
remove the "static" keyword. The actual refactoring will be done in
the next patch. I hope with this the changes I do in the refactoring
become more visible and much easier to review.
Change-Id: Idba859ec0c24f3622ea8fb8d7a9b11843d1e3827