mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Fixed newline stripping in rtve mode.
- Only strip newlines after ">" chars (still not robust, but better than stripping everywhere). This prevents useless/incorrect diffs in rtve mode and lets us identify real bugs. Change-Id: Iab7b41c4b3d6351c090f8d3a3070330325e876d4
This commit is contained in:
parent
9e2a47d540
commit
bb7d7c09a5
|
@ -328,7 +328,7 @@ app.get( new RegExp('/_rtve/(?:(?:(?:' + env.interwikiRegexp + '):+)?(' + env.in
|
|||
var tpr = new TemplateRequest( env, target ),
|
||||
cb = function ( req, res, src, document ) {
|
||||
// strip newlines from the html
|
||||
var html = document.innerHTML.replace(/[\r\n]/g, ''),
|
||||
var html = document.innerHTML.replace(/>[\r\n]+/g, '>'),
|
||||
p = new html5.Parser();
|
||||
p.parse( html );
|
||||
var newDocument = p.tree.document;
|
||||
|
|
Loading…
Reference in a new issue