Skip to content

Commit 65c430b

Browse files
committed
fix: tabs render
1 parent d8b94da commit 65c430b

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

docs/.vitepress/theme/tabs/markdownPlugin.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ export const tabsPlugin = (md: MarkdownIt) => {
2222
render(tokens: Token[], index: number) {
2323
let i = index + 1;
2424
let tabsCnt = 0;
25-
while(tokens[i].type !== 'container_tabs_close') {
26-
if (tokens[i].type === 'tab_open') {
27-
tabsCnt++;
28-
}
29-
i++;
30-
if (i >= tokens.length) {
31-
break;
25+
if (tokens.length > i) {
26+
while (tokens[i].type !== 'container_tabs_close') {
27+
if (tokens[i].type === 'tab_open') {
28+
tabsCnt++;
29+
}
30+
i++;
31+
if (i >= tokens.length) {
32+
break;
33+
}
3234
}
3335
}
3436
const token = tokens[index]

docs/en/kotlin-dsl/delegated-properties.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ The CommandAPI offers an additional way to access arguments when using Kotlin: [
1616

1717
If you are already using the Kotlin DSL to create your commands, you can already use delegated properties. `commandapi-core-kotlin` is included in `commandapi-bukkit-kotlin`.
1818

19+
20+
1921
### Access arguments using delegated properties
2022

2123
To be able to access arguments by using delegated properties, your variable name needs to match the node name of the argument. This could look like this:

0 commit comments

Comments
 (0)