mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-23 16:06:53 +00:00
ApiDiscussionToolsEdit: Unwrap Parsoid sections before parsing
Otherwise, when a transclusion covers a section boundary, both whole
sections are considered to be transcluded.
We already use this method everywhere else (by way of
HookUtils::parseRevisionParsoidHtml), and VisualEditor also applies
the same transformation (mw.libs.ve.unwrapParsoidSections) before
opening the page for editing.
Bug: T327704
Change-Id: I9d8288e2740d816edb9cbc01d7e5642d52c610d3
(cherry picked from commit c9deff179f
)
This commit is contained in:
parent
1f342306b4
commit
ee1b8c113d
|
@ -247,6 +247,8 @@ class ApiDiscussionToolsEdit extends ApiBase {
|
|||
|
||||
$container = DOMCompat::getBody( $doc );
|
||||
|
||||
CommentUtils::unwrapParsoidSections( $container );
|
||||
|
||||
$threadItemSet = $this->commentParser->parse( $container, $title->getTitleValue() );
|
||||
|
||||
if ( $commentId ) {
|
||||
|
|
Loading…
Reference in a new issue