CommentController: Apply pre-save transform when switching to visual

Parsoid doesn't understand syntax expanded during pre-save transform,
e.g. [[User:Foo|]] or ~~~~, and it gets nowikied when switching back.

Change-Id: I791426d9d6c0a1399b1e95039b11e43a3e5bf79f
This commit is contained in:
Bartosz Dziewoński 2020-06-22 21:01:09 +02:00
parent 03665de09e
commit b6edd8ddef

View file

@ -462,7 +462,8 @@ CommentController.prototype.switchToVisual = function () {
action: 'visualeditor', action: 'visualeditor',
paction: 'parsefragment', paction: 'parsefragment',
page: pageData.pageName, page: pageData.pageName,
wikitext: wikitext wikitext: wikitext,
pst: true
} ).then( function ( response ) { } ).then( function ( response ) {
return response && response.visualeditor.content; return response && response.visualeditor.content;
} ); } );