Matt Bierner
da36e0eba1
Disable url smart paste in autolinks ( #204673 )
...
Fixes #188859
2024-02-07 18:01:32 -08:00
Matt Bierner
4be04d5d8c
Fix file uri markdown link pasting ( #203377 )
...
Fixes #203180
Enables this feature for uris without authorities and also makes sure these uris are not rewritten to relative paths
2024-01-29 09:24:28 -08:00
Matt Bierner
772791e9e5
Fix markdown link pasting when selection is inline code ( #203657 )
...
If the user selects a complete inline code block, we should paste as a markdown link with the code as the link text
2024-01-29 09:10:52 +01:00
Matt Bierner
98d55333b9
Fix md pasting inside of incomplete html block ( #203476 )
...
Fix pasting inside of incomplete html block
Fixes #188868
2024-01-28 23:55:19 -08:00
Michael Rienstra
dc10e26a05
docs: document new configuration.markdown.copyFiles.destination options ( #203391 )
...
docs: document new `configuration.markdown.copyFiles.destination`
And clean-up / standardize existing docs of same
2024-01-25 00:39:51 +00:00
Matt Bierner
9c95828898
Enable paste url for file uris ( #203270 )
...
Fixes #203180
2024-01-23 17:08:58 -08:00
Matt Bierner
a42d4751d2
Fix markdown smart paste setting check ( #202688 )
2024-01-18 00:51:27 +01:00
Matt Bierner
8f32885359
Use markdown engine to enable/disable smart paste ( #202192 )
...
Fixes #188863
Fixes #188958
Fixes #188868
This is more reliable than using the regular expressions. However the regular expressions are still needed for inline elements
2024-01-10 14:32:58 -08:00
Matt Bierner
0bb69da87c
Add new smartWithSelection option for markdown links ( #202183 )
...
This becomes the new default while `smart` always smartly pastes, even with no selection
2024-01-10 20:01:52 +01:00
Matt Bierner
35579c0b57
De-prioritize markdown link paste in code blocks ( #202109 )
2024-01-09 14:27:28 -08:00
Matt Bierner
14b09484ff
Change how placeholders in parsed markdown links are created ( #201851 )
...
Fixes #186284
See https://github.com/microsoft/vscode/issues/186284#issuecomment-1877968127 for details
Also fixes the tab order to always start from the top most range in the document
2024-01-04 17:21:09 -08:00
Matt Bierner
26ef59c6a7
Rework markdown paste resource ( #201838 )
...
Fixes #184980
This refactors much of the logic around markdown paste/drop. PR got a little large but the main highlights are:
- Allow using a custom snippet for inserted audio/video
- Merge the drop/paste resource provider classes since these are so similar
- Enable smart pasting of url text by default
- Refactor url paste logic
- For now, disable the behavior where url paste could paste a combination of markdown and plain uris. In practice this is confusing, especially because our labels for this were wrong. We can always reintroduce this later if multicursor users find it useful
2024-01-04 15:59:14 -08:00
Matt Bierner
9b8f216b8c
Support escapes in markdown destination settings ( #200911 )
...
Support escaping `$` to prevent use as variable and escaping `/` inside of transforms
2023-12-15 02:02:27 +01:00
Matt Bierner
955ad8630b
Add support for documentRelativeDirName and documentRelativeFilePath ( #200883 )
...
Fixes #193752
2023-12-14 13:03:23 -08:00
Matt Bierner
4c5336dae1
Skip encoding of markdown links ( #200588 )
...
Fixes #200213
This encoding should no longer be needed now that we can smartly insert angle bracket links
2023-12-12 08:52:25 +11:00
Matt Bierner
ff9fc384d3
Clean up and fix markdown url pasting ( #198706 )
...
Fixes #192568
2023-11-20 14:37:00 -08:00
Matt Bierner
ad31b067ab
Fix markdown link inserting ( #198702 )
...
Fixes #190769
Fixes #195349
Also makes some small code cleanups
2023-11-20 21:10:43 +01:00
Matt Bierner
4f303bb42c
Disable md paste file path in untitled notebooks ( #198372 )
...
Fixes #194809
Since the notebook does not exist on disk yet, there's no way to write a relative path in it. Just disable the feature since there's nothing else we can reasonably do here
2023-11-16 00:31:39 +01:00
Meghan Kulkarni
01d8f7d47c
regex fix for codeql ( #190211 )
...
* regex fix
* added suppression comment
2023-08-11 10:24:32 -07:00
Matt Bierner
388d3683ea
Small cleanups in markdown drop/paste ( #189985 )
...
- Observer cancellation more places
- Create constants for mime types
- Making code more consistent to show duplication
2023-08-08 16:27:21 -07:00
Matt Bierner
8c7747252e
Move drop/paste ids onto providers ( #189961 )
...
For #179430 , #30066
This lets us call just the provider we are interested in
2023-08-08 14:44:03 -07:00
Matt Bierner
39df243d21
priority -> yieldTo for drop/paste API proposals (#189881 )
...
Move await from `priority` for drop/paste API proposals
For #179430 , #30066
Switching to use `yieldTo` instead of `priority` to let an extension de-rank itself in the list of edits. `priority` was an arbitrary number while `yieldTo` gives more control over how the ranking takes place
2023-08-07 18:32:03 -07:00
Meghan Kulkarni
1e882b5626
Deprioritize pasteAsMarkdown ( #189433 )
...
* deprioritize
* fix tests
* cleaned up code
2023-08-02 10:41:18 -07:00
Meghan Kulkarni
0e15feeb95
Fixed markdown regular expression ( #189423 )
...
* fixed md regex
* update shared.ts
2023-08-01 14:32:33 -07:00
Meghan Kulkarni
934cd52fa8
Links paste as plain text over markdown links ( #189366 )
...
* remove updateTitle
* fixed ranges and tests
* fix tests
2023-08-01 13:14:56 -07:00
Meghan Kulkarni
12985b627a
Links are not automatically pasted as markdown over valid urls ( #189347 )
...
* check if selected text is link
2023-07-31 16:24:48 -07:00
Meghan Kulkarni
1fcc384bae
Automatic markdown pasting should escape parentheses ( #189357 )
...
auto link with mismatched parens
2023-07-31 23:01:01 +01:00
Meghan Kulkarni
ed59945156
Links with no authority are considered invalid ( #189323 )
...
* edit validateLink
2023-07-31 19:36:21 +01:00
Meghan Kulkarni
f7d59ef171
Links are not automatically pasted as Markdown link if nothing is selected ( #189338 )
...
update automatic pasting
2023-07-31 11:30:03 -07:00
Meghan Kulkarni
070707dffc
Smart pasting results in a new widget label ( #189098 )
...
* add and localize smart label
2023-07-27 22:30:46 +01:00
Meghan Kulkarni
b5a46136c4
Markdown link pasting does not encode or decode links ( #188992 )
...
* uris pasted with no encoding or decoding
* add tests for checking encoding
2023-07-27 20:13:03 +01:00
Meghan Kulkarni
df16c16211
Smart markdown pasting does not occur in tilde code block ( #189004 )
...
smart paste checks ~~~ code block
2023-07-27 09:09:38 -07:00
Meghan Kulkarni
87afa166d0
markdown link smart pasting ( #188437 )
...
* making markdown link pasting feature smarter
* update validateLink
2023-07-24 16:25:19 -07:00
Meghan Kulkarni
2ba9f17b3f
making the markdown link paste feature smart ( #188119 )
...
* making markdown link pasting feature smarter
* Update settings description
Co-authored-by: Joyce Er <joyceerhl@gmail.com >
* made checkPaste more concise
* won't paste md link in fenced code or math
* updated the smart md link pasting
* link validation and naming changes
* resolving comments and tests
* resolving comments & writing tests
---------
Co-authored-by: Joyce Er <joyceerhl@gmail.com >
2023-07-20 15:16:40 -07:00
Meghan Kulkarni
f07abd224b
Make markdown link pasting feature smarter ( #187170 )
...
* making markdown link pasting feature smarter
* Update settings description
Co-authored-by: Joyce Er <joyceerhl@gmail.com >
* made checkPaste more concise
* won't paste md link in fenced code or math
---------
Co-authored-by: Joyce Er <joyceerhl@gmail.com >
2023-07-10 14:11:49 -07:00
Meghan Kulkarni
82e9a14903
Fix: do not encode external links ( #186778 )
...
* bug fixes
* added label to copyPaste.ts
* added localized label to copyPasteLinks file
* quick fix for pasting highlight bug
* concise if-statement
* external urls are not automatically encoded
2023-06-30 13:19:03 -07:00
Meghan Kulkarni
715334ba8c
small changes ( #186574 )
...
* bug fixes
* added label to copyPaste.ts
* added localized label to copyPasteLinks file
2023-06-29 02:14:23 +02:00
Meghan Kulkarni
6626f5f07a
turning highlighted Markdown text to link to pasted URL ( #185924 )
...
* turning highlighted Mardown text to link to pasted URL
* resolved comments
* resolved more comments
* preserved behavior of existing file pasting logic
---------
Co-authored-by: Meghan Kulkarni <t-mekulkarni@microsoft.com >
2023-06-26 17:25:52 -07:00
Matt Bierner
5ee455116f
Add codeql comments and small fix ( #185931 )
2023-06-23 02:40:39 +02:00
Matt Bierner
a9fe660ce6
Enable dropping image/* data into markdown to insert images ( #184112 )
...
Enable dropping image/* data into editor
This enable drop to create images on web
2023-06-01 21:37:48 -07:00
Matt Bierner
0e0b629ef5
Respect copy files correctly when in .dot files ( #184109 )
...
Fixes #183998
2023-06-01 21:33:48 -07:00
Matt Bierner
fa8eefda18
Use <...> style markdown links when needed ( #183876 )
...
Fixes #183849
2023-05-31 09:58:23 +10:00
Matt Bierner
d933dbdc34
Default to filename for markdown new file if empty ( #183864 )
...
Fixes #183848
2023-05-30 22:09:43 +02:00
Matt Bierner
50527c97d8
Use desired file name when generating new md pasted file paths ( #183861 )
...
Fixes #183851
2023-05-30 21:54:18 +02:00
Matt Bierner
3c161fd2b1
Add better label when adding video/video to md ( #183379 )
2023-05-25 01:30:06 +02:00
Anuj Parajuli
6675ef9017
Adds #181652 html audio tag for audio file ( #183328 )
2023-05-24 21:28:52 +00:00
Matt Bierner
7a7d45793b
Allow external copying files into the workspace on markdown drop / paste ( #182572 )
...
Allow copying files in the workspace on markdown drop / paste
Fixes #157043
Also:
- Renames the markdown paste settings and makes them no longer experimental
- Makes the copyFiles setting no longer experimental
- Adds a `markdown.copyFiles.overwriteBehavior` which lets you control if/how existing files are overwritten
2023-05-15 20:17:52 -07:00
Matt Bierner
4d38422afe
Add priority to paste / drop apis ( #182109 )
...
* Add priority to paste / drop apis
Fixes #181886
Replacement for #181453
* Make notebooks prefer text over creating attachments
2023-05-10 14:18:05 -07:00
Matt Bierner
ca51a4b04c
Add paste as command ( #181959 )
...
For #30066
This command shows a quick pick that lets you select how to paste content
2023-05-10 06:17:42 -07:00
Matt Bierner
83c12a2da2
Allow creating multiple files or attachments on paste ( #181975 )
2023-05-09 17:20:37 -07:00