mirror of
https://github.com/voideditor/void
synced 2026-05-23 01:18:25 +00:00
Fixed selection output to include triple backticks and language tag
This commit is contained in:
parent
cbb52dec28
commit
7a974f2dff
1 changed files with 1 additions and 1 deletions
|
|
@ -579,7 +579,7 @@ export const messageOfSelection = async (
|
|||
const { val } = await readFile(opts.fileService, s.uri, DEFAULT_FILE_SIZE_LIMIT)
|
||||
const lineNumAdd = lineNumAddition(s.range)
|
||||
const lines = val?.split('\n')
|
||||
const selection = lines?.slice(s.range[0] - 1, s.range[1]).join('\n')
|
||||
const selection = `${tripleTick[0]}${s.language}\n${lines?.slice(s.range[0] - 1, s.range[1]).join('\n')}\n${tripleTick[1]}`
|
||||
const content = selection ?? 'null'
|
||||
const str = `${s.uri.fsPath}${lineNumAdd}:\n${content}`
|
||||
return str
|
||||
|
|
|
|||
Loading…
Reference in a new issue