https://bugzilla.wikimedia.org/show_bug.cgi?id=64901
--- Comment #7 from [email protected] --- (In reply to Gabriel Wicke from comment #6) > (In reply to ssastry from comment #4) > > (In reply to Gabriel Wicke from comment #2) > > > > > The lost line sounds like a somewhat orthogonal issue, likely with selser. > > > It might be helped by paragraph wrapping, but ideally we would not depend > > > on > > > that to make selser work. > > > > No, this is not a selser issue. It is a p-wrapping issue. Since _rtselser > > modifies the top-level, all the top-level node separators go through regular > > wts and without a p-tag, the text-node following the p-tag doesn't get 2 > > newlines, just one. > > Let me rephrase: There's no rule that selser has to work this way. We could > also use our dsr information to substring the original wikitext between > elements if the HTML text content there was not modified. > > So selser is working the way it's currently designed, but there might still > be room to improve the way our selser implementation solves the wider selser > problem. Actually, I misspoke. I remembered adding this selser functionality to separators already. So, I looked into the code again. So, let us use a test snippet: ---------- <blockquote>a</blockquote> b c <blockquote>d</blockquote> ---------- Save it, generate html, edit it with a comment on the end and run selser on it as follows: [subbu@earth lib] node parse --trace selser --selser --oldtextfile /tmp/foobar --oldhtmlfile /tmp/foobar.html < /tmp/foobar.edited.html and see this in the output: --------- [WTS] | TEXT: " b\n\nc " ; SOL: false [WTS] | ---> SEP: "" [WTS] | sol false b c [WTS] | ---> OUT: " b\nc " --------- The absence of the P-wrapping tag leads to the "b\n\nc" to be a single text-node. Since there is no diff-markers on text-nodes (something we can fix by augmenting our dom-diff maybe), the text nodes go through regular WTS and looks like our regular WTS is normalizing newlines there. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
