@codingame/monaco-vscode-markdown-language-features-default-extension 1.83.16 → 1.85.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extension.js +19675 -27542
- package/extension.js.map +1 -1
- package/index2.js +1 -1
- package/markdown.css +2 -0
- package/package.json +2 -2
- package/package.nls.json +2 -2
- package/workerMain.js +32 -23
- package/workerMain.js.map +1 -1
package/index2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { registerExtension } from 'vscode/extensions';
|
|
2
2
|
|
|
3
|
-
var manifest = {name:"markdown-language-features",displayName:"%displayName%",description:"%description%",version:"1.0.0",icon:"icon.png",publisher:"vscode",license:"MIT",aiKey:"0c6ae279ed8443289764825290e4f9e2-1a736e7c-1324-4338-be46-fc2a58ae4d14-7255",engines:{vscode:"^1.70.0"},main:undefined,browser:"./dist/browser/extension",categories:["Programming Languages"],enabledApiProposals:["documentPaste","dropMetadata"],activationEvents:["onLanguage:markdown","onCommand:markdown.api.render","onCommand:markdown.api.reloadPlugins","onWebviewPanel:markdown.preview"],capabilities:{virtualWorkspaces:true,untrustedWorkspaces:{supported:"limited",description:"%workspaceTrust%",restrictedConfigurations:["markdown.styles"]}},contributes:{notebookRenderer:[{id:"vscode.markdown-it-renderer",displayName:"Markdown it renderer",entrypoint:"./notebook-out/index.js",mimeTypes:["text/markdown","text/latex","text/x-css","text/x-html","text/x-json","text/x-typescript","text/x-abap","text/x-apex","text/x-azcli","text/x-bat","text/x-cameligo","text/x-clojure","text/x-coffee","text/x-cpp","text/x-csharp","text/x-csp","text/x-css","text/x-dart","text/x-dockerfile","text/x-ecl","text/x-fsharp","text/x-go","text/x-graphql","text/x-handlebars","text/x-hcl","text/x-html","text/x-ini","text/x-java","text/x-javascript","text/x-julia","text/x-kotlin","text/x-less","text/x-lexon","text/x-lua","text/x-m3","text/x-markdown","text/x-mips","text/x-msdax","text/x-mysql","text/x-objective-c/objective","text/x-pascal","text/x-pascaligo","text/x-perl","text/x-pgsql","text/x-php","text/x-postiats","text/x-powerquery","text/x-powershell","text/x-pug","text/x-python","text/x-r","text/x-razor","text/x-redis","text/x-redshift","text/x-restructuredtext","text/x-ruby","text/x-rust","text/x-sb","text/x-scala","text/x-scheme","text/x-scss","text/x-shell","text/x-solidity","text/x-sophia","text/x-sql","text/x-st","text/x-swift","text/x-systemverilog","text/x-tcl","text/x-twig","text/x-typescript","text/x-vb","text/x-xml","text/x-yaml","application/json"]}],commands:[{command:"_markdown.copyImage",title:"%markdown.copyImage.title%",category:"Markdown"},{command:"markdown.showPreview",title:"%markdown.preview.title%",category:"Markdown",icon:{light:"./media/preview-light.svg",dark:"./media/preview-dark.svg"}},{command:"markdown.showPreviewToSide",title:"%markdown.previewSide.title%",category:"Markdown",icon:"$(open-preview)"},{command:"markdown.showLockedPreviewToSide",title:"%markdown.showLockedPreviewToSide.title%",category:"Markdown",icon:"$(open-preview)"},{command:"markdown.showSource",title:"%markdown.showSource.title%",category:"Markdown",icon:"$(go-to-file)"},{command:"markdown.showPreviewSecuritySelector",title:"%markdown.showPreviewSecuritySelector.title%",category:"Markdown"},{command:"markdown.preview.refresh",title:"%markdown.preview.refresh.title%",category:"Markdown"},{command:"markdown.preview.toggleLock",title:"%markdown.preview.toggleLock.title%",category:"Markdown"},{command:"markdown.findAllFileReferences",title:"%markdown.findAllFileReferences%",category:"Markdown"},{command:"markdown.editor.insertLinkFromWorkspace",title:"%markdown.editor.insertLinkFromWorkspace%",category:"Markdown",enablement:"editorLangId == markdown && !activeEditorIsReadonly"},{command:"markdown.editor.insertImageFromWorkspace",title:"%markdown.editor.insertImageFromWorkspace%",category:"Markdown",enablement:"editorLangId == markdown && !activeEditorIsReadonly"}],menus:{"webview/context":[{command:"_markdown.copyImage",when:"webviewId == 'markdown.preview' && webviewSection == 'image'"}],"editor/title":[{command:"markdown.showPreviewToSide",when:"editorLangId == markdown && !notebookEditorFocused && !hasCustomMarkdownPreview",alt:"markdown.showPreview",group:"navigation"},{command:"markdown.showSource",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'",group:"navigation"},{command:"markdown.preview.refresh",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'",group:"1_markdown"},{command:"markdown.preview.toggleLock",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'",group:"1_markdown"},{command:"markdown.showPreviewSecuritySelector",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'",group:"1_markdown"}],"explorer/context":[{command:"markdown.showPreview",when:"resourceLangId == markdown && !hasCustomMarkdownPreview",group:"navigation"},{command:"markdown.findAllFileReferences",when:"resourceLangId == markdown",group:"4_search"}],"editor/title/context":[{command:"markdown.showPreview",when:"resourceLangId == markdown && !hasCustomMarkdownPreview",group:"1_open"},{command:"markdown.findAllFileReferences",when:"resourceLangId == markdown"}],commandPalette:[{command:"_markdown.copyImage",when:"false"},{command:"markdown.showPreview",when:"editorLangId == markdown && !notebookEditorFocused",group:"navigation"},{command:"markdown.showPreviewToSide",when:"editorLangId == markdown && !notebookEditorFocused",group:"navigation"},{command:"markdown.showLockedPreviewToSide",when:"editorLangId == markdown && !notebookEditorFocused",group:"navigation"},{command:"markdown.showSource",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'",group:"navigation"},{command:"markdown.showPreviewSecuritySelector",when:"editorLangId == markdown && !notebookEditorFocused"},{command:"markdown.showPreviewSecuritySelector",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'"},{command:"markdown.preview.toggleLock",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'"},{command:"markdown.preview.refresh",when:"editorLangId == markdown && !notebookEditorFocused"},{command:"markdown.preview.refresh",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'"},{command:"markdown.findAllFileReferences",when:"editorLangId == markdown"}]},keybindings:[{command:"markdown.showPreview",key:"shift+ctrl+v",mac:"shift+cmd+v",when:"editorLangId == markdown && !notebookEditorFocused"},{command:"markdown.showPreviewToSide",key:"ctrl+k v",mac:"cmd+k v",when:"editorLangId == markdown && !notebookEditorFocused"}],configuration:{type:"object",title:"Markdown",order:20,properties:{"markdown.styles":{type:"array",items:{type:"string"},"default":[],description:"%markdown.styles.dec%",scope:"resource"},"markdown.preview.breaks":{type:"boolean","default":false,description:"%markdown.preview.breaks.desc%",scope:"resource"},"markdown.preview.linkify":{type:"boolean","default":true,description:"%markdown.preview.linkify%",scope:"resource"},"markdown.preview.typographer":{type:"boolean","default":false,description:"%markdown.preview.typographer%",scope:"resource"},"markdown.preview.fontFamily":{type:"string","default":"-apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif",description:"%markdown.preview.fontFamily.desc%",scope:"resource"},"markdown.preview.fontSize":{type:"number","default":14,description:"%markdown.preview.fontSize.desc%",scope:"resource"},"markdown.preview.lineHeight":{type:"number","default":1.6,description:"%markdown.preview.lineHeight.desc%",scope:"resource"},"markdown.preview.scrollPreviewWithEditor":{type:"boolean","default":true,description:"%markdown.preview.scrollPreviewWithEditor.desc%",scope:"resource"},"markdown.preview.markEditorSelection":{type:"boolean","default":true,description:"%markdown.preview.markEditorSelection.desc%",scope:"resource"},"markdown.preview.scrollEditorWithPreview":{type:"boolean","default":true,description:"%markdown.preview.scrollEditorWithPreview.desc%",scope:"resource"},"markdown.preview.doubleClickToSwitchToEditor":{type:"boolean","default":true,description:"%markdown.preview.doubleClickToSwitchToEditor.desc%",scope:"resource"},"markdown.preview.openMarkdownLinks":{type:"string","default":"inPreview",description:"%configuration.markdown.preview.openMarkdownLinks.description%",scope:"resource","enum":["inPreview","inEditor"],enumDescriptions:["%configuration.markdown.preview.openMarkdownLinks.inPreview%","%configuration.markdown.preview.openMarkdownLinks.inEditor%"]},"markdown.links.openLocation":{type:"string","default":"currentGroup",description:"%configuration.markdown.links.openLocation.description%",scope:"resource","enum":["currentGroup","beside"],enumDescriptions:["%configuration.markdown.links.openLocation.currentGroup%","%configuration.markdown.links.openLocation.beside%"]},"markdown.suggest.paths.enabled":{type:"boolean","default":true,description:"%configuration.markdown.suggest.paths.enabled.description%",scope:"resource"},"markdown.suggest.paths.includeWorkspaceHeaderCompletions":{type:"string","default":"onDoubleHash",scope:"resource",markdownDescription:"%configuration.markdown.suggest.paths.includeWorkspaceHeaderCompletions%","enum":["never","onDoubleHash","onSingleOrDoubleHash"],markdownEnumDescriptions:["%configuration.markdown.suggest.paths.includeWorkspaceHeaderCompletions.never%","%configuration.markdown.suggest.paths.includeWorkspaceHeaderCompletions.onDoubleHash%","%configuration.markdown.suggest.paths.includeWorkspaceHeaderCompletions.onSingleOrDoubleHash%"]},"markdown.trace.extension":{type:"string","enum":["off","verbose"],"default":"off",description:"%markdown.trace.extension.desc%",scope:"window"},"markdown.trace.server":{type:"string",scope:"window","enum":["off","messages","verbose"],"default":"off",description:"%markdown.trace.server.desc%"},"markdown.server.log":{type:"string",scope:"window","enum":["off","debug","trace"],"default":"off",description:"%markdown.server.log.desc%"},"markdown.editor.drop.enabled":{type:"boolean","default":true,markdownDescription:"%configuration.markdown.editor.drop.enabled%",scope:"resource"},"markdown.editor.drop.copyIntoWorkspace":{type:"string",markdownDescription:"%configuration.markdown.editor.drop.copyIntoWorkspace%","default":"mediaFiles","enum":["mediaFiles","never"],markdownEnumDescriptions:["%configuration.copyIntoWorkspace.mediaFiles%","%configuration.copyIntoWorkspace.never%"]},"markdown.editor.filePaste.enabled":{type:"boolean",scope:"resource",markdownDescription:"%configuration.markdown.editor.filePaste.enabled%","default":true},"markdown.editor.filePaste.copyIntoWorkspace":{type:"string",markdownDescription:"%configuration.markdown.editor.filePaste.copyIntoWorkspace%","default":"mediaFiles","enum":["mediaFiles","never"],markdownEnumDescriptions:["%configuration.copyIntoWorkspace.mediaFiles%","%configuration.copyIntoWorkspace.never%"]},"markdown.editor.pasteUrlAsFormattedLink.enabled":{type:"string",scope:"resource",markdownDescription:"%configuration.markdown.editor.pasteUrlAsFormattedLink.enabled%","default":"never","enum":["always","smart","never"],markdownEnumDescriptions:["%configuration.pasteUrlAsFormattedLink.always%","%configuration.pasteUrlAsFormattedLink.smart%","%configuration.pasteUrlAsFormattedLink.never%"]},"markdown.validate.enabled":{type:"boolean",scope:"resource",description:"%configuration.markdown.validate.enabled.description%","default":false},"markdown.validate.referenceLinks.enabled":{type:"string",scope:"resource",markdownDescription:"%configuration.markdown.validate.referenceLinks.enabled.description%","default":"warning","enum":["ignore","warning","error"]},"markdown.validate.fragmentLinks.enabled":{type:"string",scope:"resource",markdownDescription:"%configuration.markdown.validate.fragmentLinks.enabled.description%","default":"warning","enum":["ignore","warning","error"]},"markdown.validate.fileLinks.enabled":{type:"string",scope:"resource",markdownDescription:"%configuration.markdown.validate.fileLinks.enabled.description%","default":"warning","enum":["ignore","warning","error"]},"markdown.validate.fileLinks.markdownFragmentLinks":{type:"string",scope:"resource",markdownDescription:"%configuration.markdown.validate.fileLinks.markdownFragmentLinks.description%","default":"inherit","enum":["inherit","ignore","warning","error"]},"markdown.validate.ignoredLinks":{type:"array",scope:"resource",markdownDescription:"%configuration.markdown.validate.ignoredLinks.description%",items:{type:"string"}},"markdown.validate.unusedLinkDefinitions.enabled":{type:"string",scope:"resource",markdownDescription:"%configuration.markdown.validate.unusedLinkDefinitions.description%","default":"hint","enum":["ignore","hint","warning","error"]},"markdown.validate.duplicateLinkDefinitions.enabled":{type:"string",scope:"resource",markdownDescription:"%configuration.markdown.validate.duplicateLinkDefinitions.description%","default":"warning","enum":["ignore","warning","error"]},"markdown.updateLinksOnFileMove.enabled":{type:"string","enum":["prompt","always","never"],markdownEnumDescriptions:["%configuration.markdown.updateLinksOnFileMove.enabled.prompt%","%configuration.markdown.updateLinksOnFileMove.enabled.always%","%configuration.markdown.updateLinksOnFileMove.enabled.never%"],"default":"never",markdownDescription:"%configuration.markdown.updateLinksOnFileMove.enabled%",scope:"window"},"markdown.updateLinksOnFileMove.include":{type:"array",markdownDescription:"%configuration.markdown.updateLinksOnFileMove.include%",scope:"window",items:{type:"string",description:"%configuration.markdown.updateLinksOnFileMove.include.property%"},"default":["**/*.{md,mkd,mdwn,mdown,markdown,markdn,mdtxt,mdtext,workbook}","**/*.{jpg,jpe,jpeg,png,bmp,gif,ico,webp,avif,tiff,svg,mp4}"]},"markdown.updateLinksOnFileMove.enableForDirectories":{type:"boolean","default":true,description:"%configuration.markdown.updateLinksOnFileMove.enableForDirectories%",scope:"window"},"markdown.occurrencesHighlight.enabled":{type:"boolean","default":false,description:"%configuration.markdown.occurrencesHighlight.enabled%",scope:"resource"},"markdown.copyFiles.destination":{type:"object",markdownDescription:"%configuration.markdown.copyFiles.destination%",additionalProperties:{type:"string"}},"markdown.copyFiles.overwriteBehavior":{type:"string",markdownDescription:"%configuration.markdown.copyFiles.overwriteBehavior%","default":"nameIncrementally","enum":["nameIncrementally","overwrite"],markdownEnumDescriptions:["%configuration.markdown.copyFiles.overwriteBehavior.nameIncrementally%","%configuration.markdown.copyFiles.overwriteBehavior.overwrite%"]},"markdown.preferredMdPathExtensionStyle":{type:"string","default":"auto",markdownDescription:"%configuration.markdown.preferredMdPathExtensionStyle%","enum":["auto","includeExtension","removeExtension"],markdownEnumDescriptions:["%configuration.markdown.preferredMdPathExtensionStyle.auto%","%configuration.markdown.preferredMdPathExtensionStyle.includeExtension%","%configuration.markdown.preferredMdPathExtensionStyle.removeExtension%"]}}},configurationDefaults:{"[markdown]":{"editor.wordWrap":"on","editor.quickSuggestions":{comments:"off",strings:"off",other:"off"}}},jsonValidation:[{fileMatch:"package.json",url:"./schemas/package.schema.json"}],"markdown.previewStyles":["./media/markdown.css","./media/highlight.css"],"markdown.previewScripts":["./media/index.js"],customEditors:[{viewType:"vscode.markdown.preview.editor",displayName:"Markdown Preview",priority:"option",selector:[{filenamePattern:"*.md"}]}]},scripts:{compile:"gulp compile-extension:markdown-language-features-languageService && gulp compile-extension:markdown-language-features-server && gulp compile-extension:markdown-language-features && npm run build-preview && npm run build-notebook",watch:"npm run build-preview && gulp watch-extension:markdown-language-features watch-extension:markdown-language-features-languageService watch-extension:markdown-language-features-server","vscode:prepublish":"npm run build-ext && npm run build-preview","build-ext":"node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:markdown-language-features ./tsconfig.json","build-notebook":"node ./esbuild-notebook","build-preview":"node ./esbuild-preview","compile-web":"npx webpack-cli --config extension-browser.webpack.config --mode none","watch-web":"npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose"},dependencies:{"@vscode/extension-telemetry":"^0.8.5",dompurify:"^3.0.5","highlight.js":"^11.8.0","markdown-it":"^12.3.2","markdown-it-front-matter":"^0.2.1",morphdom:"^2.6.1",picomatch:"^2.3.1","vscode-languageclient":"^8.0.2","vscode-uri":"^3.0.3"},devDependencies:{"@types/dompurify":"^3.0.2","@types/lodash.throttle":"^4.1.3","@types/markdown-it":"12.2.3","@types/picomatch":"^2.3.0","@types/vscode-notebook-renderer":"^1.60.0","@types/vscode-webview":"^1.57.0","lodash.throttle":"^4.1.1","vscode-languageserver-types":"^3.17.2","vscode-markdown-languageservice":"^0.3.0-alpha.3"},repository:{type:"git",url:"https://github.com/microsoft/vscode.git"}};
|
|
3
|
+
var manifest = {name:"markdown-language-features",displayName:"%displayName%",description:"%description%",version:"1.0.0",icon:"icon.png",publisher:"vscode",license:"MIT",aiKey:"0c6ae279ed8443289764825290e4f9e2-1a736e7c-1324-4338-be46-fc2a58ae4d14-7255",engines:{vscode:"^1.70.0"},main:undefined,browser:"./dist/browser/extension",categories:["Programming Languages"],enabledApiProposals:["documentPaste","dropMetadata"],activationEvents:["onLanguage:markdown","onCommand:markdown.api.render","onCommand:markdown.api.reloadPlugins","onWebviewPanel:markdown.preview"],capabilities:{virtualWorkspaces:true,untrustedWorkspaces:{supported:"limited",description:"%workspaceTrust%",restrictedConfigurations:["markdown.styles"]}},contributes:{notebookRenderer:[{id:"vscode.markdown-it-renderer",displayName:"Markdown it renderer",entrypoint:"./notebook-out/index.js",mimeTypes:["text/markdown","text/latex","text/x-css","text/x-html","text/x-json","text/x-typescript","text/x-abap","text/x-apex","text/x-azcli","text/x-bat","text/x-cameligo","text/x-clojure","text/x-coffee","text/x-cpp","text/x-csharp","text/x-csp","text/x-css","text/x-dart","text/x-dockerfile","text/x-ecl","text/x-fsharp","text/x-go","text/x-graphql","text/x-handlebars","text/x-hcl","text/x-html","text/x-ini","text/x-java","text/x-javascript","text/x-julia","text/x-kotlin","text/x-less","text/x-lexon","text/x-lua","text/x-m3","text/x-markdown","text/x-mips","text/x-msdax","text/x-mysql","text/x-objective-c/objective","text/x-pascal","text/x-pascaligo","text/x-perl","text/x-pgsql","text/x-php","text/x-postiats","text/x-powerquery","text/x-powershell","text/x-pug","text/x-python","text/x-r","text/x-razor","text/x-redis","text/x-redshift","text/x-restructuredtext","text/x-ruby","text/x-rust","text/x-sb","text/x-scala","text/x-scheme","text/x-scss","text/x-shell","text/x-solidity","text/x-sophia","text/x-sql","text/x-st","text/x-swift","text/x-systemverilog","text/x-tcl","text/x-twig","text/x-typescript","text/x-vb","text/x-xml","text/x-yaml","application/json"]}],commands:[{command:"_markdown.copyImage",title:"%markdown.copyImage.title%",category:"Markdown"},{command:"markdown.showPreview",title:"%markdown.preview.title%",category:"Markdown",icon:{light:"./media/preview-light.svg",dark:"./media/preview-dark.svg"}},{command:"markdown.showPreviewToSide",title:"%markdown.previewSide.title%",category:"Markdown",icon:"$(open-preview)"},{command:"markdown.showLockedPreviewToSide",title:"%markdown.showLockedPreviewToSide.title%",category:"Markdown",icon:"$(open-preview)"},{command:"markdown.showSource",title:"%markdown.showSource.title%",category:"Markdown",icon:"$(go-to-file)"},{command:"markdown.showPreviewSecuritySelector",title:"%markdown.showPreviewSecuritySelector.title%",category:"Markdown"},{command:"markdown.preview.refresh",title:"%markdown.preview.refresh.title%",category:"Markdown"},{command:"markdown.preview.toggleLock",title:"%markdown.preview.toggleLock.title%",category:"Markdown"},{command:"markdown.findAllFileReferences",title:"%markdown.findAllFileReferences%",category:"Markdown"},{command:"markdown.editor.insertLinkFromWorkspace",title:"%markdown.editor.insertLinkFromWorkspace%",category:"Markdown",enablement:"editorLangId == markdown && !activeEditorIsReadonly"},{command:"markdown.editor.insertImageFromWorkspace",title:"%markdown.editor.insertImageFromWorkspace%",category:"Markdown",enablement:"editorLangId == markdown && !activeEditorIsReadonly"}],menus:{"webview/context":[{command:"_markdown.copyImage",when:"webviewId == 'markdown.preview' && webviewSection == 'image'"}],"editor/title":[{command:"markdown.showPreviewToSide",when:"editorLangId == markdown && !notebookEditorFocused && !hasCustomMarkdownPreview",alt:"markdown.showPreview",group:"navigation"},{command:"markdown.showSource",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'",group:"navigation"},{command:"markdown.preview.refresh",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'",group:"1_markdown"},{command:"markdown.preview.toggleLock",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'",group:"1_markdown"},{command:"markdown.showPreviewSecuritySelector",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'",group:"1_markdown"}],"explorer/context":[{command:"markdown.showPreview",when:"resourceLangId == markdown && !hasCustomMarkdownPreview",group:"navigation"},{command:"markdown.findAllFileReferences",when:"resourceLangId == markdown",group:"4_search"}],"editor/title/context":[{command:"markdown.showPreview",when:"resourceLangId == markdown && !hasCustomMarkdownPreview",group:"1_open"},{command:"markdown.findAllFileReferences",when:"resourceLangId == markdown"}],commandPalette:[{command:"_markdown.copyImage",when:"false"},{command:"markdown.showPreview",when:"editorLangId == markdown && !notebookEditorFocused",group:"navigation"},{command:"markdown.showPreviewToSide",when:"editorLangId == markdown && !notebookEditorFocused",group:"navigation"},{command:"markdown.showLockedPreviewToSide",when:"editorLangId == markdown && !notebookEditorFocused",group:"navigation"},{command:"markdown.showSource",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'",group:"navigation"},{command:"markdown.showPreviewSecuritySelector",when:"editorLangId == markdown && !notebookEditorFocused"},{command:"markdown.showPreviewSecuritySelector",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'"},{command:"markdown.preview.toggleLock",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'"},{command:"markdown.preview.refresh",when:"editorLangId == markdown && !notebookEditorFocused"},{command:"markdown.preview.refresh",when:"activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'"},{command:"markdown.findAllFileReferences",when:"editorLangId == markdown"}]},keybindings:[{command:"markdown.showPreview",key:"shift+ctrl+v",mac:"shift+cmd+v",when:"editorLangId == markdown && !notebookEditorFocused"},{command:"markdown.showPreviewToSide",key:"ctrl+k v",mac:"cmd+k v",when:"editorLangId == markdown && !notebookEditorFocused"}],configuration:{type:"object",title:"Markdown",order:20,properties:{"markdown.styles":{type:"array",items:{type:"string"},"default":[],description:"%markdown.styles.dec%",scope:"resource"},"markdown.preview.breaks":{type:"boolean","default":false,markdownDescription:"%markdown.preview.breaks.desc%",scope:"resource"},"markdown.preview.linkify":{type:"boolean","default":true,description:"%markdown.preview.linkify%",scope:"resource"},"markdown.preview.typographer":{type:"boolean","default":false,description:"%markdown.preview.typographer%",scope:"resource"},"markdown.preview.fontFamily":{type:"string","default":"-apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif",description:"%markdown.preview.fontFamily.desc%",scope:"resource"},"markdown.preview.fontSize":{type:"number","default":14,description:"%markdown.preview.fontSize.desc%",scope:"resource"},"markdown.preview.lineHeight":{type:"number","default":1.6,description:"%markdown.preview.lineHeight.desc%",scope:"resource"},"markdown.preview.scrollPreviewWithEditor":{type:"boolean","default":true,description:"%markdown.preview.scrollPreviewWithEditor.desc%",scope:"resource"},"markdown.preview.markEditorSelection":{type:"boolean","default":true,description:"%markdown.preview.markEditorSelection.desc%",scope:"resource"},"markdown.preview.scrollEditorWithPreview":{type:"boolean","default":true,description:"%markdown.preview.scrollEditorWithPreview.desc%",scope:"resource"},"markdown.preview.doubleClickToSwitchToEditor":{type:"boolean","default":true,description:"%markdown.preview.doubleClickToSwitchToEditor.desc%",scope:"resource"},"markdown.preview.openMarkdownLinks":{type:"string","default":"inPreview",description:"%configuration.markdown.preview.openMarkdownLinks.description%",scope:"resource","enum":["inPreview","inEditor"],enumDescriptions:["%configuration.markdown.preview.openMarkdownLinks.inPreview%","%configuration.markdown.preview.openMarkdownLinks.inEditor%"]},"markdown.links.openLocation":{type:"string","default":"currentGroup",description:"%configuration.markdown.links.openLocation.description%",scope:"resource","enum":["currentGroup","beside"],enumDescriptions:["%configuration.markdown.links.openLocation.currentGroup%","%configuration.markdown.links.openLocation.beside%"]},"markdown.suggest.paths.enabled":{type:"boolean","default":true,description:"%configuration.markdown.suggest.paths.enabled.description%",scope:"resource"},"markdown.suggest.paths.includeWorkspaceHeaderCompletions":{type:"string","default":"onDoubleHash",scope:"resource",markdownDescription:"%configuration.markdown.suggest.paths.includeWorkspaceHeaderCompletions%","enum":["never","onDoubleHash","onSingleOrDoubleHash"],markdownEnumDescriptions:["%configuration.markdown.suggest.paths.includeWorkspaceHeaderCompletions.never%","%configuration.markdown.suggest.paths.includeWorkspaceHeaderCompletions.onDoubleHash%","%configuration.markdown.suggest.paths.includeWorkspaceHeaderCompletions.onSingleOrDoubleHash%"]},"markdown.trace.extension":{type:"string","enum":["off","verbose"],"default":"off",description:"%markdown.trace.extension.desc%",scope:"window"},"markdown.trace.server":{type:"string",scope:"window","enum":["off","messages","verbose"],"default":"off",description:"%markdown.trace.server.desc%"},"markdown.server.log":{type:"string",scope:"window","enum":["off","debug","trace"],"default":"off",description:"%markdown.server.log.desc%"},"markdown.editor.drop.enabled":{type:"boolean","default":true,markdownDescription:"%configuration.markdown.editor.drop.enabled%",scope:"resource"},"markdown.editor.drop.copyIntoWorkspace":{type:"string",markdownDescription:"%configuration.markdown.editor.drop.copyIntoWorkspace%","default":"mediaFiles","enum":["mediaFiles","never"],markdownEnumDescriptions:["%configuration.copyIntoWorkspace.mediaFiles%","%configuration.copyIntoWorkspace.never%"]},"markdown.editor.filePaste.enabled":{type:"boolean",scope:"resource",markdownDescription:"%configuration.markdown.editor.filePaste.enabled%","default":true},"markdown.editor.filePaste.copyIntoWorkspace":{type:"string",markdownDescription:"%configuration.markdown.editor.filePaste.copyIntoWorkspace%","default":"mediaFiles","enum":["mediaFiles","never"],markdownEnumDescriptions:["%configuration.copyIntoWorkspace.mediaFiles%","%configuration.copyIntoWorkspace.never%"]},"markdown.editor.pasteUrlAsFormattedLink.enabled":{type:"string",scope:"resource",markdownDescription:"%configuration.markdown.editor.pasteUrlAsFormattedLink.enabled%","default":"never","enum":["always","smart","never"],markdownEnumDescriptions:["%configuration.pasteUrlAsFormattedLink.always%","%configuration.pasteUrlAsFormattedLink.smart%","%configuration.pasteUrlAsFormattedLink.never%"]},"markdown.validate.enabled":{type:"boolean",scope:"resource",description:"%configuration.markdown.validate.enabled.description%","default":false},"markdown.validate.referenceLinks.enabled":{type:"string",scope:"resource",markdownDescription:"%configuration.markdown.validate.referenceLinks.enabled.description%","default":"warning","enum":["ignore","warning","error"]},"markdown.validate.fragmentLinks.enabled":{type:"string",scope:"resource",markdownDescription:"%configuration.markdown.validate.fragmentLinks.enabled.description%","default":"warning","enum":["ignore","warning","error"]},"markdown.validate.fileLinks.enabled":{type:"string",scope:"resource",markdownDescription:"%configuration.markdown.validate.fileLinks.enabled.description%","default":"warning","enum":["ignore","warning","error"]},"markdown.validate.fileLinks.markdownFragmentLinks":{type:"string",scope:"resource",markdownDescription:"%configuration.markdown.validate.fileLinks.markdownFragmentLinks.description%","default":"inherit","enum":["inherit","ignore","warning","error"]},"markdown.validate.ignoredLinks":{type:"array",scope:"resource",markdownDescription:"%configuration.markdown.validate.ignoredLinks.description%",items:{type:"string"}},"markdown.validate.unusedLinkDefinitions.enabled":{type:"string",scope:"resource",markdownDescription:"%configuration.markdown.validate.unusedLinkDefinitions.description%","default":"hint","enum":["ignore","hint","warning","error"]},"markdown.validate.duplicateLinkDefinitions.enabled":{type:"string",scope:"resource",markdownDescription:"%configuration.markdown.validate.duplicateLinkDefinitions.description%","default":"warning","enum":["ignore","warning","error"]},"markdown.updateLinksOnFileMove.enabled":{type:"string","enum":["prompt","always","never"],markdownEnumDescriptions:["%configuration.markdown.updateLinksOnFileMove.enabled.prompt%","%configuration.markdown.updateLinksOnFileMove.enabled.always%","%configuration.markdown.updateLinksOnFileMove.enabled.never%"],"default":"never",markdownDescription:"%configuration.markdown.updateLinksOnFileMove.enabled%",scope:"window"},"markdown.updateLinksOnFileMove.include":{type:"array",markdownDescription:"%configuration.markdown.updateLinksOnFileMove.include%",scope:"window",items:{type:"string",description:"%configuration.markdown.updateLinksOnFileMove.include.property%"},"default":["**/*.{md,mkd,mdwn,mdown,markdown,markdn,mdtxt,mdtext,workbook}","**/*.{jpg,jpe,jpeg,png,bmp,gif,ico,webp,avif,tiff,svg,mp4}"]},"markdown.updateLinksOnFileMove.enableForDirectories":{type:"boolean","default":true,description:"%configuration.markdown.updateLinksOnFileMove.enableForDirectories%",scope:"window"},"markdown.occurrencesHighlight.enabled":{type:"boolean","default":false,description:"%configuration.markdown.occurrencesHighlight.enabled%",scope:"resource"},"markdown.copyFiles.destination":{type:"object",markdownDescription:"%configuration.markdown.copyFiles.destination%",additionalProperties:{type:"string"}},"markdown.copyFiles.overwriteBehavior":{type:"string",markdownDescription:"%configuration.markdown.copyFiles.overwriteBehavior%","default":"nameIncrementally","enum":["nameIncrementally","overwrite"],markdownEnumDescriptions:["%configuration.markdown.copyFiles.overwriteBehavior.nameIncrementally%","%configuration.markdown.copyFiles.overwriteBehavior.overwrite%"]},"markdown.preferredMdPathExtensionStyle":{type:"string","default":"auto",markdownDescription:"%configuration.markdown.preferredMdPathExtensionStyle%","enum":["auto","includeExtension","removeExtension"],markdownEnumDescriptions:["%configuration.markdown.preferredMdPathExtensionStyle.auto%","%configuration.markdown.preferredMdPathExtensionStyle.includeExtension%","%configuration.markdown.preferredMdPathExtensionStyle.removeExtension%"]}}},configurationDefaults:{"[markdown]":{"editor.wordWrap":"on","editor.quickSuggestions":{comments:"off",strings:"off",other:"off"}}},jsonValidation:[{fileMatch:"package.json",url:"./schemas/package.schema.json"}],"markdown.previewStyles":["./media/markdown.css","./media/highlight.css"],"markdown.previewScripts":["./media/index.js"],customEditors:[{viewType:"vscode.markdown.preview.editor",displayName:"Markdown Preview",priority:"option",selector:[{filenamePattern:"*.md"}]}]},scripts:{compile:"gulp compile-extension:markdown-language-features-languageService && gulp compile-extension:markdown-language-features-server && gulp compile-extension:markdown-language-features && npm run build-preview && npm run build-notebook",watch:"npm run build-preview && gulp watch-extension:markdown-language-features watch-extension:markdown-language-features-languageService watch-extension:markdown-language-features-server","vscode:prepublish":"npm run build-ext && npm run build-preview","build-ext":"node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:markdown-language-features ./tsconfig.json","build-notebook":"node ./esbuild-notebook","build-preview":"node ./esbuild-preview","compile-web":"npx webpack-cli --config extension-browser.webpack.config --mode none","watch-web":"npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose"},dependencies:{"@vscode/extension-telemetry":"^0.9.0",dompurify:"^3.0.5","highlight.js":"^11.8.0","markdown-it":"^12.3.2","markdown-it-front-matter":"^0.2.1",morphdom:"^2.6.1",picomatch:"^2.3.1","vscode-languageclient":"^8.0.2","vscode-languageserver-textdocument":"^1.0.11","vscode-uri":"^3.0.3"},devDependencies:{"@types/dompurify":"^3.0.2","@types/lodash.throttle":"^4.1.3","@types/markdown-it":"12.2.3","@types/picomatch":"^2.3.0","@types/vscode-notebook-renderer":"^1.60.0","@types/vscode-webview":"^1.57.0","lodash.throttle":"^4.1.1","vscode-languageserver-types":"^3.17.2","vscode-markdown-languageservice":"^0.3.0-alpha.3"},repository:{type:"git",url:"https://github.com/microsoft/vscode.git"}};
|
|
4
4
|
|
|
5
5
|
const { registerFileUrl, whenReady } = registerExtension(manifest);
|
|
6
6
|
registerFileUrl('./media/preview-light.svg', new URL('./preview-light.svg', import.meta.url).toString(), 'image/svg+xml');
|
package/markdown.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-markdown-language-features-default-extension",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.85.0-next.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"module": "index2.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.85.0-next.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
package/package.nls.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"displayName": "Markdown Language Features",
|
|
3
3
|
"description": "Provides rich language support for Markdown.",
|
|
4
4
|
"markdown.copyImage.title": "Copy Image",
|
|
5
|
-
"markdown.preview.breaks.desc": "Sets how line-breaks are rendered in the Markdown preview. Setting it to
|
|
5
|
+
"markdown.preview.breaks.desc": "Sets how line-breaks are rendered in the Markdown preview. Setting it to `true` creates a `<br>` for newlines inside paragraphs.",
|
|
6
6
|
"markdown.preview.linkify": "Convert URL-like text to links in the Markdown preview.",
|
|
7
7
|
"markdown.preview.typographer": "Enable some language-neutral replacement and quotes beautification in the Markdown preview.",
|
|
8
8
|
"markdown.preview.doubleClickToSwitchToEditor.desc": "Double-click in the Markdown preview to switch to the editor.",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"configuration.markdown.copyFiles.overwriteBehavior": "Controls if files created by drop or paste should overwrite existing files.",
|
|
68
68
|
"configuration.markdown.copyFiles.overwriteBehavior.nameIncrementally": "If a file with the same name already exists, append a number to the file name, for example: `image.png` becomes `image-1.png`.",
|
|
69
69
|
"configuration.markdown.copyFiles.overwriteBehavior.overwrite": "If a file with the same name already exists, overwrite it.",
|
|
70
|
-
"configuration.markdown.preferredMdPathExtensionStyle": "Controls if file extensions (
|
|
70
|
+
"configuration.markdown.preferredMdPathExtensionStyle": "Controls if file extensions (for example `.md`) are added or not for links to Markdown files. This setting is used when file paths are added by tooling such as path completions or file renames.",
|
|
71
71
|
"configuration.markdown.preferredMdPathExtensionStyle.auto": "For existing paths, try to maintain the file extension style. For new paths, add file extensions.",
|
|
72
72
|
"configuration.markdown.preferredMdPathExtensionStyle.includeExtension": "Prefer including the file extension. For example, path completions to a file named `file.md` will insert `file.md`.",
|
|
73
73
|
"configuration.markdown.preferredMdPathExtensionStyle.removeExtension": "Prefer removing the file extension. For example, path completions to a file named `file.md` will insert `file` without the `.md`.",
|
package/workerMain.js
CHANGED
|
@@ -14102,17 +14102,17 @@ const referenceLinkPattern = new RegExp((0, string_1.r) `(?<![\]\\])` + // Must
|
|
|
14102
14102
|
// [text][ref] or [text][]
|
|
14103
14103
|
/**/ (0, string_1.r) `(?<prefix>` + // Start link prefix
|
|
14104
14104
|
/****/ (0, string_1.r) `!?` + // Optional image ref
|
|
14105
|
-
/****/ (0, string_1.r) `\[((?:` + // Link text
|
|
14105
|
+
/****/ (0, string_1.r) `\[(?<text>(?:` + // Link text
|
|
14106
14106
|
/******/ (0, string_1.r) `\\.|` + // escaped character, or...
|
|
14107
14107
|
/******/ (0, string_1.r) `[^\[\]\\]|` + // non bracket char, or...
|
|
14108
14108
|
/******/ (0, string_1.r) `\[[^\[\]]*\]` + // matched bracket pair
|
|
14109
14109
|
/****/ `)*)\]` + // end link text
|
|
14110
14110
|
/****/ (0, string_1.r) `\[\s*` + // Start of link def
|
|
14111
14111
|
/**/ (0, string_1.r) `)` + // end link prefix
|
|
14112
|
-
/**/ (0, string_1.r) `((?:[^\\\]]|\\.)*?)\]` + // link def
|
|
14112
|
+
/**/ (0, string_1.r) `(?<ref>(?:[^\\\]]|\\.)*?)\]` + // link def
|
|
14113
14113
|
/**/ (0, string_1.r) `|` +
|
|
14114
14114
|
// [shorthand]
|
|
14115
|
-
/****/ (0, string_1.r) `\[\s*((?:\\.|[^\[\]])+?)\s*\]` +
|
|
14115
|
+
/****/ (0, string_1.r) `\[\s*(?<shorthand>(?:\\.|[^\[\]\\])+?)\s*\]` +
|
|
14116
14116
|
(0, string_1.r) `)` +
|
|
14117
14117
|
(0, string_1.r) `(?![\(])`, // Must not be followed by a paren to avoid matching normal links
|
|
14118
14118
|
'gm');
|
|
@@ -14124,7 +14124,7 @@ const autoLinkPattern = /\<(\w+:[^\>\s]+)\>/g;
|
|
|
14124
14124
|
* Matches `[text]: link`
|
|
14125
14125
|
*/
|
|
14126
14126
|
const definitionPattern = /^([\t ]*\[(?!\^)((?:\\\]|[^\]])+)\]:\s*)([^<]\S*|<(?:\\[<>]|[^<>])+>)/gm;
|
|
14127
|
-
const inlineCodePattern = /(
|
|
14127
|
+
const inlineCodePattern = /(?<!`)(`+)((?:.+?|.*?(?:(?:\r?\n).+?)*?)(?:\r?\n)?\1)(?!`)/gm;
|
|
14128
14128
|
class NoLinkRanges {
|
|
14129
14129
|
multiline;
|
|
14130
14130
|
inline;
|
|
@@ -14135,9 +14135,9 @@ class NoLinkRanges {
|
|
|
14135
14135
|
const inlineRanges = new Map();
|
|
14136
14136
|
const text = document.getText();
|
|
14137
14137
|
for (const match of text.matchAll(inlineCodePattern)) {
|
|
14138
|
-
const startOffset =
|
|
14138
|
+
const startOffset = match.index ?? 0;
|
|
14139
14139
|
const startPosition = document.positionAt(startOffset);
|
|
14140
|
-
const range = { start: startPosition, end: document.positionAt(startOffset + match[
|
|
14140
|
+
const range = { start: startPosition, end: document.positionAt(startOffset + match[0].length) };
|
|
14141
14141
|
for (let line = range.start.line; line <= range.end.line; ++line) {
|
|
14142
14142
|
let entry = inlineRanges.get(line);
|
|
14143
14143
|
if (!entry) {
|
|
@@ -14275,6 +14275,9 @@ class MdLinkComputer {
|
|
|
14275
14275
|
}
|
|
14276
14276
|
*#getReferenceLinksInText(document, text, startingOffset, noLinkRanges) {
|
|
14277
14277
|
for (const match of text.matchAll(referenceLinkPattern)) {
|
|
14278
|
+
if (!match.groups) {
|
|
14279
|
+
continue;
|
|
14280
|
+
}
|
|
14278
14281
|
const linkStartOffset = startingOffset + (match.index ?? 0);
|
|
14279
14282
|
const linkStart = document.positionAt(linkStartOffset);
|
|
14280
14283
|
if (noLinkRanges.contains(linkStart)) {
|
|
@@ -14282,9 +14285,9 @@ class MdLinkComputer {
|
|
|
14282
14285
|
}
|
|
14283
14286
|
let hrefStart;
|
|
14284
14287
|
let hrefEnd;
|
|
14285
|
-
let reference = match[
|
|
14288
|
+
let reference = match.groups['ref'];
|
|
14286
14289
|
if (reference === '') { // [ref][],
|
|
14287
|
-
reference = match[
|
|
14290
|
+
reference = match.groups['text'].trim();
|
|
14288
14291
|
if (!reference) {
|
|
14289
14292
|
continue;
|
|
14290
14293
|
}
|
|
@@ -14293,7 +14296,7 @@ class MdLinkComputer {
|
|
|
14293
14296
|
hrefEnd = document.positionAt(offset + reference.length);
|
|
14294
14297
|
}
|
|
14295
14298
|
else if (reference) { // [text][ref]
|
|
14296
|
-
const text = match[
|
|
14299
|
+
const text = match.groups['text'];
|
|
14297
14300
|
if (!text) {
|
|
14298
14301
|
// Handle the case ![][cat]
|
|
14299
14302
|
if (!match[0].startsWith('!')) {
|
|
@@ -14310,8 +14313,8 @@ class MdLinkComputer {
|
|
|
14310
14313
|
hrefStart = document.positionAt(offset);
|
|
14311
14314
|
hrefEnd = document.positionAt(offset + reference.length);
|
|
14312
14315
|
}
|
|
14313
|
-
else if (match[
|
|
14314
|
-
reference = match[
|
|
14316
|
+
else if (match.groups['shorthand']) { // [ref]
|
|
14317
|
+
reference = match.groups['shorthand'].trim();
|
|
14315
14318
|
if (!reference) {
|
|
14316
14319
|
continue;
|
|
14317
14320
|
}
|
|
@@ -14323,7 +14326,7 @@ class MdLinkComputer {
|
|
|
14323
14326
|
continue;
|
|
14324
14327
|
}
|
|
14325
14328
|
// See if link looks like a checkbox
|
|
14326
|
-
const checkboxMatch = line.match(/^\s*[
|
|
14329
|
+
const checkboxMatch = line.match(/^\s*[\-\*\+]\s*\[x\]/i);
|
|
14327
14330
|
if (checkboxMatch && hrefStart.character <= checkboxMatch[0].length) {
|
|
14328
14331
|
continue;
|
|
14329
14332
|
}
|
|
@@ -23940,25 +23943,31 @@ function getFilePathRange(link) {
|
|
|
23940
23943
|
return link.source.hrefRange;
|
|
23941
23944
|
}
|
|
23942
23945
|
exports.getFilePathRange = getFilePathRange;
|
|
23943
|
-
function
|
|
23944
|
-
|
|
23946
|
+
function newPathWithFragmentIfNeeded(newPath, link) {
|
|
23947
|
+
if (link.href.kind === documentLinks_1.HrefKind.Internal && link.href.fragment) {
|
|
23948
|
+
return newPath + '#' + link.href.fragment;
|
|
23949
|
+
}
|
|
23950
|
+
return newPath;
|
|
23951
|
+
}
|
|
23952
|
+
function getLinkRenameEdit(link, newPathText) {
|
|
23953
|
+
const linkRange = link.source.hrefRange;
|
|
23945
23954
|
// TODO: this won't be correct if the file name contains `\`
|
|
23946
|
-
|
|
23955
|
+
newPathText = newPathWithFragmentIfNeeded(newPathText.replace(/\\/g, '/'), link);
|
|
23947
23956
|
if (link.source.isAngleBracketLink) {
|
|
23948
|
-
if (!(0, mdLinks_1.needsAngleBracketLink)(
|
|
23957
|
+
if (!(0, mdLinks_1.needsAngleBracketLink)(newPathText)) {
|
|
23949
23958
|
// Remove the angle brackets
|
|
23950
|
-
const range = (0, range_1.makeRange)((0, position_1.translatePosition)(
|
|
23951
|
-
return { range, newText:
|
|
23959
|
+
const range = (0, range_1.makeRange)((0, position_1.translatePosition)(linkRange.start, { characterDelta: -1 }), (0, position_1.translatePosition)(linkRange.end, { characterDelta: 1 }));
|
|
23960
|
+
return { range, newText: newPathText };
|
|
23952
23961
|
}
|
|
23953
23962
|
else {
|
|
23954
|
-
return { range:
|
|
23963
|
+
return { range: linkRange, newText: (0, mdLinks_1.escapeForAngleBracketLink)(newPathText) };
|
|
23955
23964
|
}
|
|
23956
23965
|
}
|
|
23957
23966
|
// We might need to use angle brackets for the link
|
|
23958
|
-
if ((0, mdLinks_1.needsAngleBracketLink)(
|
|
23959
|
-
return { range:
|
|
23967
|
+
if ((0, mdLinks_1.needsAngleBracketLink)(newPathText)) {
|
|
23968
|
+
return { range: linkRange, newText: `<${(0, mdLinks_1.escapeForAngleBracketLink)(newPathText)}>` };
|
|
23960
23969
|
}
|
|
23961
|
-
return { range:
|
|
23970
|
+
return { range: linkRange, newText: newPathText };
|
|
23962
23971
|
}
|
|
23963
23972
|
exports.getLinkRenameEdit = getLinkRenameEdit;
|
|
23964
23973
|
//# sourceMappingURL=rename.js.map
|
|
@@ -25160,7 +25169,7 @@ class MdPathCompletionProvider {
|
|
|
25160
25169
|
return (0, mdLinks_1.escapeForAngleBracketLink)(name);
|
|
25161
25170
|
}
|
|
25162
25171
|
if (!(0, mdLinks_1.hasBalancedParens)(name)) {
|
|
25163
|
-
name = name.replace(/([()])/g, '\\$1');
|
|
25172
|
+
name = name.replace(/([()])/g, '\\$1'); // CodeQL [SM02383] This code is for editing text, not sanitizing rendered markdown
|
|
25164
25173
|
}
|
|
25165
25174
|
return name.replaceAll(' ', '%20');
|
|
25166
25175
|
}
|