Page MenuHomePhabricator

Document that RegExps for ve.ui.Sequence should end in $
Closed, ResolvedPublic1 Estimated Story Points

Description

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.

Event Timeline

Change 297801 had a related patch set uploaded (by Esanders):
Better documentation of the data argument in sequences

https://gerrit.wikimedia.org/r/297801

Jdforrester-WMF assigned this task to Esanders.
Jdforrester-WMF triaged this task as Medium priority.
Jdforrester-WMF set the point value for this task to 1.

Change 297801 merged by jenkins-bot:
Better documentation of the data argument in sequences

https://gerrit.wikimedia.org/r/297801