Skip to content

Commit 6a03bf2

Browse files
committed
分割字符串以简化uri
1 parent a7d6332 commit 6a03bf2

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

client/out/luadoc.js

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/src/luadoc.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,12 @@ function createPanel(workPath, disposables, viewType, args) {
186186
function activateLuaDoc(workPath, disposables, LuaDoc) {
187187
disposables.push(vscode.commands.registerCommand(LuaDoc.OpenCommand, (args) => {
188188
try {
189-
createPanel(workPath, disposables, LuaDoc.ViewType, args || {
190-
language: "en-us",
191-
version: "54",
192-
file: "readme.html",
189+
let params = args.split("/");
190+
createPanel(workPath, disposables, LuaDoc.ViewType, {
191+
language: params[0],
192+
version: params[1],
193+
file: params[2],
194+
anchor: params[3],
193195
});
194196
} catch (error) {
195197
console.error(error)

0 commit comments

Comments
 (0)