Skip to content

Commit 9a69cd4

Browse files
committed
☕ Fix gen-function to support new versions
1 parent e8b759e commit 9a69cd4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

scripts/gen-function/format.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ import { Definition, Variant } from "./types.ts";
33
const denops = "https://deno.land/x/denops_core@v3.1.0/mod.ts";
44

55
const translate: Record<string, string> = {
6+
"*config": "config",
7+
"*opts": "opts",
68
"default": "defaultValue",
79
"delete": "delete_",
10+
"end-col": "end_col",
11+
"end-lnum": "end_lnum",
812
"eval": "eval_",
9-
"function": "function_",
10-
"lnum-end": "lnum_end",
1113
"fname-one": "fname_one",
1214
"fname-two": "fname_two",
15+
"function": "function_",
16+
"lnum-end": "lnum_end",
1317
};
1418

1519
function formatDocs(docs: string): string[] {

scripts/gen-function/parse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function parse(content: string): Definition[] {
2525
const e = content.lastIndexOf("\n", me);
2626
const block = content
2727
.substring(s, e)
28-
.replaceAll(/\*.+?\*/g, "") // Remove tags
28+
.replaceAll(/\*\S+?\*/g, "") // Remove tags
2929
.replaceAll(/\s+\n/g, "\n") // Remove trailing '\s'
3030
.trim();
3131
definitions.push(parseBlock(fn, block));

0 commit comments

Comments
 (0)