You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/mode-reference.rst
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ Regular expression starting a mode. For example a single quote for strings or tw
62
62
If absent, ``begin`` defaults to a regexp that matches anything, so the mode starts immediately.
63
63
64
64
65
-
after:begin
65
+
on:begin
66
66
^^^^^^^^^^^
67
67
68
68
**type**: callback (matchData, response)
@@ -72,6 +72,8 @@ This callback is triggered the moment a begin match is detected. ``matchData`` i
72
72
- ``response.data`` - a simple object data store. Can be used for building more complex rules where the end rule is dependent on the content of begin, etc.
73
73
- ``response.ignoreMatch()`` - pretend as if this match never happened. The mode is not entered. Continues trying subsequent modes in the current mode's ``contains`` list
74
74
75
+
For an example of usage see ``END_SAME_AS_BEGIN`` in ``modes.js``.
76
+
75
77
76
78
end
77
79
^^^
@@ -90,7 +92,7 @@ Sometimes a mode can end not by itself but implicitly with its containing (paren
90
92
This is achieved with :ref:`endsWithParent <endsWithParent>` attribute.
91
93
92
94
93
-
before:end
95
+
on:end
94
96
^^^^^^^^^^^
95
97
96
98
**type**: callback (matchData, response)
@@ -100,6 +102,8 @@ This callback is triggered the moment an end match is detected. ``matchData`` in
100
102
- ``response.data`` - a simple object data store. Can be used for building more complex rules where the end rule is dependent on the content of begin, etc.
101
103
- ``response.ignoreMatch()`` - pretend as if this match never happened. The mode is not entered. Continues trying subsequent modes in the current mode's ``contains`` list
102
104
105
+
For an example of usage see ``END_SAME_AS_BEGIN`` in ``modes.js``.
106
+
103
107
104
108
beginKeywords
105
109
^^^^^^^^^^^^^^^^
@@ -204,8 +208,12 @@ tell it to end the function definition after itself:
204
208
205
209
.. _endSameAsBegin:
206
210
207
-
endSameAsBegin
208
-
^^^^^^^^^^^^^^
211
+
endSameAsBegin (deprecated as of 10.1)
212
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
213
+
214
+
**Deprecated:** *This attribute has been deprecated.* You should instead use the
215
+
``END_SAME_AS_BEGIN`` mode or use the ``on:begin`` and ``on:end`` attributes to
0 commit comments