mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Description2
synced 2024-11-23 22:33:34 +00:00
c146909532
With this change, generated descriptions are cut at 300 characters, without breaking words when possible, and with an ellipsis added in case the cut happened mid-sentence. The `Description2::getFirstChars` function was borrowed from TextExtracts with minor alterations (added comment for their regex, and removed `>` from word healing given it's unclear why it's been included). New configuration variable `$wgDescriptionMaxChars` (proposed default: 300, which seems like a sensible amount) controls this behaviour. This has been in testing on ark.wiki.gg (with the platform's approval, which I'm glad for) since early September. Without this change, we had a few pages with little sections having a huge part of their body text thrown into the `description` meta tag... Depends-On: I585f2c0046571310aad67f3ba148c4f22aaae49f Change-Id: I04b00f99085f07f773212ee3eca8470eece34e9e |
||
---|---|---|
i18n | ||
includes | ||
.eslintrc.json | ||
.gitignore | ||
.gitreview | ||
.phpcs.xml | ||
CODE_OF_CONDUCT.md | ||
composer.json | ||
Description2.i18n.magic.php | ||
extension.json | ||
Gruntfile.js | ||
package-lock.json | ||
package.json |