mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
08b5ed1a43
This makes sure that we escape start-of-line syntax when needed, since onNewline is often not yet set. Discussion / background: [19:18] <subbu> this will fix it, but, i think this is asking for another minor refactoring of these flags ... because this is a subtle fix which means it might be possible to make it clearer. onNewline is one true in on direction, i.e. if true, we are in a new line state, but if we are in a newline context, onNewline is not true, which is why this new method is needed. [19:19] <subbu> i dont know if it is possible, but it seems like it shoudl be possible. but, something for later. [19:20] <subbu> badly phraed. "onNewline" ==> in new line context, but if in new line context, onNewline may be false. [19:20] <gwicke> we should perhaps update it as early as possible instead [19:21] <subbu> i cannot today, but possible monday. i am heading out in about 15-30 mins. [19:22] <gwicke> will need to check all conditions depending on it in _serializeToken [19:22] <subbu> oh, i misunderstood you :) [19:22] <gwicke> and if there are cases where the onNewline / onStartOfLine state could be reverted later [19:23] <subbu> you were referring to the flag, i thought you meant we should fix this sooner than later. [19:23] <gwicke> yes, I wasn't terribly clear [19:23] <gwicke> you wrote something about following productions swallowing newlines, but I think we don't actually do that any more [19:24] <gwicke> I'm quite optimistic that updating those flags much earlier would work [19:25] <subbu> yes, it could fix it. [19:26] <subbu> you might be right reg. swallowing. it was happening earlier. but, not right now, after single-line mode and other fixes. Change-Id: Ic1d8141c04eb54a59977d0ba87bcf06bafd421e0 |
||
---|---|---|
.. | ||
jquery | ||
parser | ||
qunit | ||
rangy | ||
sandbox | ||
ve |