jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/392992 )
Change subject: PresentationModelSectionTrait: Use section anchor generation
from code
......................................................................
PresentationModelSectionTrait: Use section anchor generation from code
We used to have to DIY it because the core method stripped links, but
with guessSectionNameFromStrippedText() this is no longer an issue.
This allows us to pick up the nbsp handling that was added to core in
129067c907.
Bug: T180689
Depends-On: I56b9dda805a51517549c5ed709f4bd747ca04577
Change-Id: I192218dd14464de5041ceb1c16125bbcd8f44f18
---
M includes/formatters/PresentationModelSectionTrait.php
1 file changed, 1 insertion(+), 2 deletions(-)
Approvals:
Sbisson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/formatters/PresentationModelSectionTrait.php
b/includes/formatters/PresentationModelSectionTrait.php
index 9a18639..ebf949b 100644
--- a/includes/formatters/PresentationModelSectionTrait.php
+++ b/includes/formatters/PresentationModelSectionTrait.php
@@ -70,8 +70,7 @@
protected function getTitleWithSection() {
$title = $this->event->getTitle();
$section = $this->getParsedSectionTitle();
- // Like Parser::guessSectionNameFromWikiText() but without the
link stripping
- $fragment = Sanitizer::normalizeSectionNameWhitespace( $section
);
+ $fragment = substr( Parser::guessSectionNameFromStrippedText(
$section ), 1 );
if ( $section ) {
$title = Title::makeTitle(
$title->getNamespace(),
--
To view, visit https://gerrit.wikimedia.org/r/392992
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I192218dd14464de5041ceb1c16125bbcd8f44f18
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Sbisson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits