mirror of
https://github.com/markedjs/marked
synced 2024-11-23 09:48:17 +00:00
docs: fix indexOf typo (#3526)
This commit is contained in:
parent
10a53d9547
commit
dc4ae3be8d
@ -388,7 +388,7 @@ An **inline-level** extension will be handled inside each block-level token, bef
|
||||
<dt><code><strong>start</strong>(<i>string</i> src)</code></dt>
|
||||
<dd>A function that returns the index of the next potential start of the custom token.
|
||||
|
||||
The index can be the result of a <code>src.match().index</code>, or even a simple <code>src.index()</code>. Marked will use this function to ensure that it does not skip over any text that should be part of the custom token.</dd>
|
||||
The index can be the result of a <code>src.match().index</code>, or even a simple <code>src.indexOf()</code>. Marked will use this function to ensure that it does not skip over any text that should be part of the custom token.</dd>
|
||||
|
||||
<dt><code><strong>tokenizer</strong>(<i>string</i> src, <i>array</i> tokens)</code></dt>
|
||||
<dd>A function that reads string of Markdown text and returns a generated token. The token pattern should be found at the beginning of the <code>src</code> string. Accordingly, if using a Regular Expression to detect a token, it should be anchored to the string start (`^`). The <code>tokens</code> parameter contains the array of tokens that have been generated by the lexer up to that point, and can be used to access the previous token, for instance.
|
||||
|
Loading…
Reference in New Issue
Block a user