File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export async function openMention(mention?: string, osInfo?: string): Promise<vo
2323 }
2424
2525 if (
26- ( ( osInfo === "unix" || osInfo === undefined ) && mention . startsWith ( "/" ) ) ||
26+ ( osInfo !== "win32" && mention . startsWith ( "/" ) ) ||
2727 ( osInfo === "win32" && mention . startsWith ( "\\" ) )
2828 ) {
2929 const relPath = mention . slice ( 1 )
@@ -164,7 +164,7 @@ const fileHandler: HandlerConfig = {
164164 test : ( mention : string , { osInfo } ) => ( osInfo !== "win32" ? mention . startsWith ( "/" ) : mention . startsWith ( "\\" ) ) ,
165165 handler : async ( mention , { cwd, osInfo } ) => {
166166 let mentionPath = mention . slice ( 1 )
167- const isFolder = mention . endsWith ( "/" )
167+ const isFolder = osInfo === "win32" ? mention . endsWith ( "\\" ) : mention . endsWith ( "/" )
168168 const tag = createXmlTag ( isFolder ? "folder_content" : "file_content" , { path : mentionPath } )
169169
170170 if ( mentionPath . includes ( " " ) ) {
You can’t perform that action at this time.
0 commit comments