Pure option splitting for the Hexo tabs tag and its individual tab comments.
- Source:
Methods
(inner) splitOption(option) → {Array.<string>}
Split a tabs option at its first colon, without trimming or interpreting the value.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
option |
string
|
An option such as title:Step 1: Install.
|
Returns:
- Type:
-
Array.<string>
The key and value, or only the key when there is no colon.
(inner) splitTabOptions(source) → {Array.<string>}
Split individual tab comment options on ASCII spaces, respecting leading single or double quotes.
Quotes within bare tokens are literal. Backslashes inside quotes protect the next character from
closing the token, but remain in the result; they do not escape spaces in bare tokens.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
source |
string
|
The option text inside a <!-- tab ... --> comment.
|
Throws:
-
For an unclosed quoted option or a non-space character after its closing quote.
- Type
-
Error
Returns:
- Type:
-
Array.<string>
Options with enclosing quotes removed and all other characters preserved.