Skip to content

turning highlighted Markdown text to link to pasted URL - #185924

Merged
Matt Bierner (mjbvz) merged 9 commits into
microsoft:mainfrom
MeghanKulkarni:MeghanKulkarni/pasting-markdown-links
Jun 27, 2023
Merged

Matt Bierner (mjbvz) merged 9 commits into
microsoft:mainfrom
MeghanKulkarni:MeghanKulkarni/pasting-markdown-links

Conversation

@MeghanKulkarni

@MeghanKulkarni Meghan Kulkarni (MeghanKulkarni) commented Jun 22, 2023 •

Copy link
Copy Markdown
Contributor

Providing ability for pasting over highlighted Markdown text to turn the text into a link to the pasted URL

Fixes #179628

@mjbvz Matt Bierner (mjbvz) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few more suggestions

@mjbvz Matt Bierner (mjbvz) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few more points of feedback. The most important one is that to make sure we aren't going to change the existing file/uri-list paste flow

const snippetEdits = coalesce(activeEditor.selections.map((selection, i): vscode.SnippetTextEdit | undefined => {
const selectionText = activeEditor.document.getText(selection);
const snippet = createUriListSnippet(activeEditor.document, selectedFiles, {
const snippet = createUriListSnippet(activeEditor.document, selectedFiles, title, placeholderValue, {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between these new arguments and the existing placeholderText / placeholderStartIndex values passed in below?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not want to change to existing functionality of insertResource.ts, so I wanted to keep placeholderText and placeholderString as they are. I made an edit in shared.ts that will hopefully make more sense.

@mjbvz Matt Bierner (mjbvz) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes!

Approving so we can test this tomorrow. Please make sure to follow up on any remaining comments

@mjbvz
Matt Bierner (mjbvz) merged commit 6626f5f into microsoft:main Jun 27, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide ability for pasting over highlighted Markdown text to turn the text into a link to the pasted URL

3 participants