Unlike strings and arrays, regular expressions are not anchored at the current position of the cursor when used in ve.ui.Sequence, i.e. while a sequence constructed from 'foo' only triggers when foo is directly before the cursor, a sequence from /foo/ will trigger whenever the string foo is anywhere before the cursor.
This is a bit unexpected, so the documentation should advice to use a $ in the RegExp to anchor it to the cursor and thus make it behave like strings and arrays.
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Better documentation of the data argument in sequences | VisualEditor/VisualEditor | master | +3 -1 |
Event Timeline
This comment was removed by • Esanders.
Comment Actions
Change 297801 had a related patch set uploaded (by Esanders):
Better documentation of the data argument in sequences
Comment Actions
Change 297801 merged by jenkins-bot:
Better documentation of the data argument in sequences