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:
Subramanya Sastry 2012-06-19 12:34:42 -05:00
parent 9e2a47d540
commit bb7d7c09a5

View file

@ -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;