Commit Graph

254 Commits

Author SHA1 Message Date
Matt Bierner
1cc342a089 Merge branch 'main' into dev/mjbvz/legitimate-squirrel 2025-10-14 23:01:21 -07:00
Matt Bierner
98ad0f55db Proper fix for missing node types in web build
Using `path` in web for these cases is ok (but not ideal) because webpack shims it out
2025-10-14 12:14:28 -07:00
Martin Aeschlimann
cf1a93be3f Markdown: Open Preview - doesn't work for *.prompt.md files (#270417) 2025-10-08 20:09:33 +00:00
Matt Bierner
a8101c12b5 Fix any cases in md extension
For #269213
2025-10-03 14:15:39 -07:00
Matt Bierner
360c9fd134 Add lint rule for as any and bulk ignore all existing breaks
For #269213

This adds a new eslint rule for `as any` and `<any>({... })`. We'd like to remove almost all of these, however right now the first goal is to prevent them in new code. That's why with this first PR I simply add `eslint-disable` comments for all breaks

Trying to get this change in soon after branching off for release to hopefully minimize disruption during debt week work
2025-10-02 23:38:33 -07:00
Matt Bierner
73e6d6a0a2 Enable a few more stylistic eslint options for my extensions 2025-08-14 10:42:20 -07:00
Liu
e741ef491b Update copyFiles.ts 2025-06-06 02:43:21 +08:00
Matt Bierner
0252e92b01 Merge pull request #239046 from mjbvz/gross-yak
Support more image/video/audio types for markdown copy into files
2025-02-04 11:20:36 -08:00
Matt Bierner
94c2ff587a Use more clear label for markdown validation item 2025-01-29 14:13:00 -08:00
ふぁ
f07edc3dbe fix: update unix timestamp to milliseconds in copyFiles feature
Signed-off-by: ふぁ <yuki@yuki0311.com>
2025-01-29 15:35:33 +09:00
Matt Bierner
f9213d7b48 Support more image/video/audio types for markdown copy into files
Fixes #239016
2025-01-28 15:35:46 -08:00
henry
da45c202b2 added unix time to copyfiles for markdown 2025-01-15 22:54:34 -06:00
Matt Bierner
7cc28c3e81 Add markdown validation status item
Fixes #236399
2024-12-17 11:30:32 -08:00
Matt Bierner
fc5cff7bb6 Allow overriding how markdown links are inserted using the keybinding (#234310)
Allows using the `kind` field in the `pasteAs` keybinding to force links to be inserted a certain way, such as as images
2024-11-21 00:55:47 +01:00
Matt Bierner
c83b443da0 Clean up support for paste edits (#234240)
- Allow setting an array of preferences for paste as keybindings
- Clarifies kinds used for core and extensions
- Exports text kind as API
2024-11-20 07:14:10 +01:00
Matt Bierner
b832b859e8 Finalize markdown update links on paste setting (#221760)
Fixes #209318

Enables this new feature by default (but as an option, not the default way to paste)
2024-07-22 09:52:01 -07:00
BrunoSoaresEngineering
3fdda617d3 feat(markdown-language-features): #208398 add avif as image extension (#212547) 2024-05-13 15:29:10 +00:00
Matt Bierner
8c363b460b Merge and cleanup drop and paste proposal (#209591)
These two proposals overlap a lot and will be finalized together
2024-04-05 13:03:10 -07:00
Matt Bierner
998047ca2f Add experimental support for updating markdown links on copy/paste (#209319)
* Add experimental support for updating markdown links on copy/paste

For #209318

* Remove log
2024-04-02 17:15:12 +02:00
Matt Bierner
7d788e70b9 Limit drop disablement to just http(s) uris (#209240)
For #209239
2024-04-01 04:37:06 -07:00
Matt Bierner
e5f5e91423 Make paste resource respect paste location (#207635)
Fixes #207186
2024-03-13 22:27:44 +01:00
Matt Bierner
9aecd9794a Cleaning up paste api proposal (#207495) 2024-03-12 21:11:05 +01:00
Matt Bierner
091987d943 Update paste and drop proposals (#206496)
* Update paste and drop proposals

Reworks the document paste and drop API proposals. Main highlights:

- Align more with code action api
- Allow a single paste provider to return multiple edits
- Allow resolving applied edits lazily
- Switch from using ids to scoped kinds like used for code actions

* Adding paste context

* Add context

* Update test
2024-03-07 16:04:36 -08:00
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