forked from ajaxorg/ace
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.html
More file actions
295 lines (281 loc) · 18.4 KB
/
Copy pathsearch.html
File metadata and controls
295 lines (281 loc) · 18.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<div id="documentation" class="span9">
<div class="classContent">
<div class="membersBackground"></div>
<div class=" members pos0">
<div class=" membersContent pos0">
<h1 class="memberHeader"><span class="name">Search</span>
</h1>
<ul data-tabs="tabs" class="nav tabs pos0">
<li data-dropdown="dropdown" class="dropdown">
<ul class="dropdown-menu">
</ul>
</li>
<li data-dropdown="dropdown" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle"><span>Constructors (1)</span><b class="caret"></b></a>
<ul class="dropdown-menu">
<li id="dropdown_Search.new" data-id="Search.new" class="memberLink"><a href="#Search.new" class="" title="Search.new (constructor)" data-id="Search.new">new</a>
</li>
</ul>
</li>
<li data-dropdown="dropdown" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle"><span>Functions (6)</span><b class="caret"></b></a>
<ul class="dropdown-menu">
<li id="dropdown_Search.find" data-id="Search.find" class="memberLink"><a href="#Search.find" class="" title="Search.find (class method)" data-id="Search.find">find</a>
</li>
<li id="dropdown_Search.findAll" data-id="Search.findAll" class="memberLink"><a href="#Search.findAll" class="" title="Search.findAll (class method)" data-id="Search.findAll">findAll</a>
</li>
<li id="dropdown_Search.getOptions" data-id="Search.getOptions" class="memberLink"><a href="#Search.getOptions" class="" title="Search.getOptions (class method)" data-id="Search.getOptions">getOptions</a>
</li>
<li id="dropdown_Search.replace" data-id="Search.replace" class="memberLink"><a href="#Search.replace" class="" title="Search.replace (class method)" data-id="Search.replace">replace</a>
</li>
<li id="dropdown_Search.set" data-id="Search.set" class="memberLink"><a href="#Search.set" class="" title="Search.set (class method)" data-id="Search.set">set</a>
</li>
<li id="dropdown_Search.setOptions" data-id="Search.setOptions" class="memberLink"><a href="#Search.setOptions" class="" title="Search.setOptions (class method)" data-id="Search.setOptions">setOptions</a>
</li>
</ul>
</li>
<li data-dropdown="dropdown" class="dropdown">
<ul class="dropdown-menu">
</ul>
</li>
<li data-dropdown="dropdown" class="dropdown">
<ul class="dropdown-menu">
</ul>
</li>
<li data-dropdown="dropdown" class="dropdown">
<ul class="dropdown-menu">
</ul>
</li>
<li data-dropdown="dropdown" class="dropdown">
<ul class="dropdown-menu">
</ul>
</li>
</ul>
</div>
</div>
<article id="Search" data-title="Search (class)" class="article">
<div class="section description">
<div class="memberContent"><p>A class designed to handle all sorts of text searches within a <a href="document.html" class="link-short" title="Document (class)" data-id="Document"><code>Document</code></a>.</p>
</div>
</div>
</article>
<h3 class="sectionHeader">Constructors</h3>
<article id="Search.new" data-title="Search.new (constructor)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title"><i id="Search.new" class="methodToggle methodClicker inactive icon-caret-right"></i>
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span class="constructorIdentifier">new </span><span id="Search.new" class="member-name methodClicker">Search</span><span class="emptyArgumentList">()</span></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_Search.new" class="ellipsis_description"><p>Creates a new <code>Search</code> object. The following search options are avaliable:</p>
</div>
<div class="description"><p>Creates a new <code>Search</code> object. The following search options are avaliable:</p>
<ul>
<li><code>needle</code>: The string or regular expression you're looking for</li>
<li><code>backwards</code>: Whether to search backwards from where cursor currently is. Defaults to <code>false</code>.</li>
<li><code>wrap</code>: Whether to wrap the search back to the beginning when it hits the end. Defaults to <code>false</code>.</li>
<li><code>caseSensitive</code>: Whether the search ought to be case-sensitive. Defaults to <code>false</code>.</li>
<li><code>wholeWord</code>: Whether the search matches only on whole words. Defaults to <code>false</code>.</li>
<li><code>range</code>: The <a href="range.html" class="link-short" title="Range (class)" data-id="Range"><code>Range</code></a> to search within. Set this to <code>null</code> for the whole document</li>
<li><code>regExp</code>: Whether the search is a regular expression or not. Defaults to <code>false</code>.</li>
<li><code>start</code>: The starting <a href="range.html" class="link-short" title="Range (class)" data-id="Range"><code>Range</code></a> or cursor position to begin the search</li>
<li><code>skipCurrent</code>: Whether or not to include the current line in the search. Default to <code>false</code>.</li>
</ul>
</div>
</div>
</div>
</div>
</article>
<h3 class="sectionHeader">Methods</h3>
<article id="Search.find" data-title="Search.find (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title"><i id="Search.find" class="methodToggle methodClicker inactive icon-caret-right"></i>
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="Search.find" class="member-name methodClicker"><span class="sigClassName">Search.</span><span class="sigMemberName">find</span></span>(<span class="sigArgList"><a href="edit_session.html" class="argument methodClicker" title="EditSession (class)" data-id="EditSession">EditSession</a> session</span>)
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type"><a href="range.html" class="returnType " title="Range (class)" data-id="Range">Range</a></li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_Search.find" class="ellipsis_description"><p>Searches for <code>options.needle</code>. If found, this method returns the <a href="range.html" class="link-short" title="Range (class)" data-id="Range"><code>Range</code></a> where the text first occurs. If <code>options.backwards</code> is <code>true</code>, the search goes backwards in the session.</p>
</div>
<div class="description"><p>Searches for <code>options.needle</code>. If found, this method returns the <a href="range.html" class="link-short" title="Range (class)" data-id="Range"><code>Range</code></a> where the text first occurs. If <code>options.backwards</code> is <code>true</code>, the search goes backwards in the session.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">session</td><td class="argType" "><a href="edit_session.html" class="" title="EditSession (class)" data-id="EditSession">EditSession</a></td><td class="argDescription "><p>Required. The session to search with</p>
</td></tr></table>
</div>
</div>
</div>
</div>
</article>
<article id="Search.findAll" data-title="Search.findAll (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title"><i id="Search.findAll" class="methodToggle methodClicker inactive icon-caret-right"></i>
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="Search.findAll" class="member-name methodClicker"><span class="sigClassName">Search.</span><span class="sigMemberName">findAll</span></span>(<span class="sigArgList"><a href="edit_session.html" class="argument methodClicker" title="EditSession (class)" data-id="EditSession">EditSession</a> session</span>)
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type"><a href="range.html" class="returnType " title="Range (class)" data-id="Range">Range</a></li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_Search.findAll" class="ellipsis_description"><p>Searches for all occurances <code>options.needle</code>. If found, this method returns an array of <a href="range.html" class="link-short" title="Range (class)" data-id="Range"><code>Range</code>s</a> where the text first occurs. If <code>options.backwards</code> is <code>true</code>, the search goes backwards in the session.</p>
</div>
<div class="description"><p>Searches for all occurances <code>options.needle</code>. If found, this method returns an array of <a href="range.html" class="link-short" title="Range (class)" data-id="Range"><code>Range</code>s</a> where the text first occurs. If <code>options.backwards</code> is <code>true</code>, the search goes backwards in the session.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">session</td><td class="argType" "><a href="edit_session.html" class="" title="EditSession (class)" data-id="EditSession">EditSession</a></td><td class="argDescription "><p>Required. The session to search with</p>
</td></tr></table>
</div>
</div>
</div>
</div>
</article>
<article id="Search.getOptions" data-title="Search.getOptions (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title"><i id="Search.getOptions" class="methodToggle methodClicker inactive icon-caret-right"></i>
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="Search.getOptions" class="member-name methodClicker"><span class="sigClassName">Search.</span><span class="sigMemberName">getOptions</span></span><span class="emptyArgumentList">()</span>
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="returnType " title="Object" data-id="Object">Object</a></li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_Search.getOptions" class="ellipsis_description"><p>Returns an object containing all the search options.</p>
</div>
<div class="description"><p>Returns an object containing all the search options.</p>
</div>
</div>
</div>
</div>
</article>
<article id="Search.replace" data-title="Search.replace (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title"><i id="Search.replace" class="methodToggle methodClicker inactive icon-caret-right"></i>
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="Search.replace" class="member-name methodClicker"><span class="sigClassName">Search.</span><span class="sigMemberName">replace</span></span>(<span class="sigArgList"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="argument methodClicker" title="String" data-id="String">String</a> input, <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="argument methodClicker" title="String" data-id="String">String</a> replacement</span>)
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="returnType " title="String" data-id="String">String</a></li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_Search.replace" class="ellipsis_description"><p>Searches for <code>options.needle</code> in <code>input</code>, and, if found, replaces it with <code>replacement</code>.</p>
</div>
<div class="description"><p>Searches for <code>options.needle</code> in <code>input</code>, and, if found, replaces it with <code>replacement</code>.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">input</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The text to search in</p>
</td></tr><tr class="argumentRow "><td class="argName ">replacement</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The replacing text</p>
<ul>
<li>(String): If <code>options.regExp</code> is <code>true</code>, this function returns <code>input</code> with the replacement already made. Otherwise, this function just returns <code>replacement</code>.<br/>
If <code>options.needle</code> was not found, this function returns <code>null</code>.</li>
</ul>
</td></tr></table>
</div>
</div>
</div>
</div>
</article>
<article id="Search.set" data-title="Search.set (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title"><i id="Search.set" class="methodToggle methodClicker inactive icon-caret-right"></i>
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="Search.set" class="member-name methodClicker"><span class="sigClassName">Search.</span><span class="sigMemberName">set</span></span>(<span class="sigArgList"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="argument methodClicker" title="Object" data-id="Object">Object</a> options</span>)
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type"><a href="search.html" class="returnType " title="Search (class)" data-id="Search">Search</a></li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
<li><span class="label chainable">Chainable</span></li>
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_Search.set" class="ellipsis_description"><p>Sets the search options via the <code>options</code> parameter.</p>
</div>
<div class="description"><p>Sets the search options via the <code>options</code> parameter.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">options</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. An object containing all the new search properties</p>
</td></tr></table>
</div>
</div>
</div>
</div>
</article>
<article id="Search.setOptions" data-title="Search.setOptions (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title"><i id="Search.setOptions" class="methodToggle methodClicker inactive icon-caret-right"></i>
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="Search.setOptions" class="member-name methodClicker"><span class="sigClassName">Search.</span><span class="sigMemberName">setOptions</span></span><span class="emptyArgumentList">()</span></li>
</ul>
<ul class="metaInfo">
<li><span class="label undocumented">Undocumented</span></li>
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_Search.setOptions" class="ellipsis_description">
</div>
<div class="description">
</div>
</div>
</div>
</div>
</article>
</div>
<script defer src="./resources/javascripts/ux.js"></script>
<script src="./resources/javascripts/clicker.js"></script>
<script src="./resources/javascripts/jquery-scrollspy.js"></script>
<script defer src="./resources/javascripts/disqus-ext.js"></script>
<script defer src="./resources/javascripts/ga.js"></script>
<div id="disqus_thread"></div>
</div>