mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-23 15:56:55 +00:00
61874ca30e
The ParserOutput object used here starts life as the ParserOutput for parsing the docpage (wrapped via an interface message). In order to remove use of the Title::getPageViewLanguage method there, we need to re-arrange some logic such that we parse the doc page first, and see what language it was rendered in, instead of currently where Title::getPageViewLanguage tries to "guess" what Parser and LanguageConverter will do. As prep for that stop reading/writing the HTML text of this ParserOutput object in favour of being more like the Parser itself, which accumulates metadata in ParserOutput and calls setText only once at the end. * Refactor highlight() to return standalone HTML instead. * Refactor validation error to append to $html instead. Other improvements while at it: * Document how stuff works today. * Clarify variable names. * Separate concerns better by moving responsibility of `<pre>` fallback to highlight(), and limiting knowledge of ScribuntoEngineBase to the caller. Bug: T350806 Change-Id: I9fe6d93727f29c284ea21db6edd6a2b1663e8e06 |
||
---|---|---|
.phan | ||
i18n | ||
includes | ||
modules | ||
tests | ||
.eslintrc.json | ||
.gitignore | ||
.gitreview | ||
.phpcs.xml | ||
.stylelintrc.json | ||
CODE_OF_CONDUCT.md | ||
composer.json | ||
COPYING | ||
extension.json | ||
Gruntfile.js | ||
package-lock.json | ||
package.json | ||
Scribunto.constants.php | ||
Scribunto.magic.php | ||
Scribunto.namespaces.php |