Commit Graph

236 Commits

Author SHA1 Message Date
Martin Aeschlimann
cf1a93be3f Markdown: Open Preview - doesn't work for *.prompt.md files (#270417) 2025-10-08 20:09:33 +00:00
Matt Bierner
f272e51947 Convert esbuild scripts to modules
Planning to convert to typescript but want to do it in a few smaller steps
2025-08-07 20:04:44 -07:00
Matt Bierner
4b9b99ba7a Pick up latest md language server
For #248467
2025-07-25 16:07:10 -07:00
Martin Aeschlimann
25a8dd4f0b enable markdown language server for prompt files (#252656) 2025-06-30 14:19:00 -07:00
Matt Bierner
d4d2f93bf7 Pick up latest vscode-markdown-languageserver 2025-05-20 19:28:34 -07:00
Matt Bierner
dd74e0494a Pick up latest md language server 2025-03-24 15:03:03 -07:00
Matt Bierner
23812e0d8f Make sure scripts in md preview are properly evaluated
Fixes #243454

This restores the previous behavior. If the default security settings are used, scripts will still block blocked by the CSP. If you fully disable the security settings, then we'll try to run them
2025-03-17 11:45:49 -07:00
Seong Min Park
7c7d37ea8d revert markdown.trace.server 2025-02-20 22:09:42 +09:00
Seong Min Park
690caf2e14 logger 2025-02-19 22:36:54 +09:00
dependabot[bot]
d37a30e600 Bump dompurify from 3.1.7 to 3.2.4 in /extensions/markdown-language-features (#240973)
Bump dompurify in /extensions/markdown-language-features

Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.1.7 to 3.2.4.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.1.7...3.2.4)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-17 11:31:27 +01:00
João Moreno
f6ec9aa2e6 bump katex (#238271) 2025-01-20 10:39:21 +01:00
Matt Bierner
4daea74ba9 Finalize paste api and drop api tweaks
Fixes #30066

This finalizes the documentPaste api. This api allows extensions to attach metadata on text copy and change how content is pasted. Some examples:

- Updating imports for pasted code
- Inserting an image as an attachment in notebooks
- Pasting files converts them to relative text paths
2025-01-07 14:57:16 -08:00
Matt Bierner
4559089128 Merge pull request #234649 from notoriousmango/feat-open-image
Add 'open image' context in markdown preview
2024-12-17 11:55:25 -08:00
Logan Ramos
e689b912ba Update telemetry package (#236378) 2024-12-17 20:12:49 +01:00
notoriousmango
0b243279cc open image 2024-11-26 19:53:31 +09:00
Matt Bierner
002c12c922 Pick up latest markdown language server (#232634) 2024-10-30 10:34:40 -07:00
Matt Bierner
759c92ba74 Bump dompurify versions (#230250) 2024-10-18 11:53:18 -07:00
dependabot[bot]
2e4877af7c Bump dompurify from 3.0.5 to 3.1.3 in /extensions/markdown-language-features (#228773)
Bump dompurify in /extensions/markdown-language-features

Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.0.5 to 3.1.3.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.0.5...3.1.3)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-18 16:33:30 -07:00
Robo
b5a6aa14a8 feat: switch to npm as default package manager (#226927)
* feat: move from yarn to npm

* chore: skip yarn.lock files

* fix: playwright download

* chore: fix compile and hygiene

* chore: bump vsce@2.17.0

Refs 8b49e9dfdf

* test: update results for bat and sh colorizer tests

* fix: add missing lock files for windows

* fix: switch to legacy-peer-deps

* chore: update markdown-it@14.1.0

Refs 737c95a129

esbuild step in extensions-ci-pr was previously using markdown-it
from root which had userland punycode and was able to compile successfully.

* ci: increase pr timeout for windows integration tests

* chore: fix product build

* build: ignore extension dev dependency for rcedit

* build: fix working directory inside container

* build: fix dependency generation

* npm: update dependencies

* ci: use global npmrc

* ci: update cache

* ci: setup global npmrc for private npm auth

* build: fix extension bundling

* chore: sync npm dependencies

* ci: debug env variables for container

* ci: fix win32 cli pipeline

* build: fix npmrc config usage for build/ and remote/ dirs

* fix: windows build

* fix: container builds

* fix: markdown-language-features tests and bundling

```
[03:58:22] Error: Command failed: /Users/demohan/.nvm/versions/node/v20.15.1/bin/node /Users/demohan/github/vscode/extensions/markdown-language-features/esbuild-notebook.js --outputRoot /Users/demohan/github/vscode/.build/extensions/markdown-language-features
✘ [ERROR] Could not resolve "punycode"

    extensions/markdown-language-features/node_modules/markdown-it/lib/index.js:14:27:
      14 │ var punycode     = require('punycode');
         ╵                            ~~~~~~~~~~

  The package "punycode" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
```

Adds userland package based on beed9aee2c

* fix: container builds for distro

* chore: update yarn occurrences

* fixup! chore: bump vsce@2.17.0

Uses the closest version to `main` branch that does not
include d3cc84cdec
while still having the fix 8b49e9dfdf

* chore: sync npm dependencies

* chore: sync npm dependencies

* chore: sync npm dependencies

* chore: throw error when yarn is used for installation

* chore: add review feedback

* chore: switch exec => run where needed

* chore: npm sync dependencies

* fix: markdown-language-features bundling

```
✘ [ERROR] Could not resolve "punycode"

    extensions/markdown-language-features/node_modules/markdown-it/lib/index.js:14:27:
      14 │ var punycode     = require('punycode');
         ╵                            ~~~~~~~~~~

  The package "punycode" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
```

Adds missing userland package based on markdown-it/markdown-it@beed9ae,
can be removed once we update markdown-it >= 14.1.0

* ci: rename no-yarn-lock-changes.yml

* chore: sync npm dependencies

* ci: restore no-yarn-lock-changes.yml

We can disable it in a separate PR to keep the required
checks happy and also need workflow edit perms.

* chore: sync npm dependencies

* ci: rebuild cache

* ci: fix no-package-lock-changes.yml

* chore: bump distro

* chore: rm yarn.lock files

* chore: rm yarn.lock files without dependencies

* chore: add vscode-selfhost-import-aid to postinstall dirs

* chore: bump distro
2024-09-06 22:18:02 +09:00
Matt Bierner
caa558b764 Pick up latest Markdown language server (#224020) 2024-07-26 16:55:33 -07: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
Matt Bierner
7174171947 Move MD server into own package (#212387)
* Move MD server into own package

* Remove a few more refs

* Try glob

* Move glob

* More glob

* Add logging

* Tweak glob again

* Use webpack to copy over files

* Remove a few more refs to server

* Fix debug check
2024-07-12 14:04:42 -07:00
Matt Bierner
98785f537e Fix setting type (#210408)
Fixes #210400
2024-04-15 18:51:02 +02: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
7a623b31fb Fix frontmatter line map (#209556)
Fixes #209267
2024-04-04 19:39:21 +02: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
e5f5e91423 Make paste resource respect paste location (#207635)
Fixes #207186
2024-03-13 22:27:44 +01:00
Matt Bierner
c72ffc8cd8 Use published markdown-katex typings (#202284) 2024-01-11 13:42:24 -08: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
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
ff9fc384d3 Clean up and fix markdown url pasting (#198706)
Fixes #192568
2023-11-20 14:37:00 -08:00
Logan Ramos
9bea1fc96a Bump telemetry package (#197168) 2023-11-01 20:51:03 +01:00
Matt Bierner
d6f3707465 Use markdown for markdown.preview.breaks (#194641) 2023-10-02 19:43:00 +01:00
Logan Ramos
cc98e55794 Fix slow telemetry module (#193607) 2023-09-20 20:14:12 +01:00
Logan Ramos
ecb0c80fc1 Bump extension telemetry module (#191237)
* Bump extension telemetry module

* Fix webpack
2023-08-24 12:53:41 -07:00
Matt Bierner
013600cf33 Don't show copy image in command palette (#190907)
#190773
2023-08-22 22:14:24 +01:00
Matt Bierner
909693076d Bump dompurify (#189368)
* Bump dompurify

Moving to 3.x which drops IE support

* Don't reference trusted types

* Restore esm export block
2023-07-31 17:52:21 -07:00
Meghan Kulkarni
e731964e84 Automatic markdown link pasting off by default (#189100)
pasting as markdown link off
2023-07-27 23:11:51 +01:00
Matt Bierner
2c4cdea85f Bump highlight js versions (#187619)
Fixes #187605
2023-07-11 20:20:57 +02: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
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
MeghanKulkarni
67cc0965b3 allow images in markdown preview editor to be copied (#184432)
* allow images in markdown preview editor to be copied

* resolved feedback

* added findPreview method

* removed copy image command from showPreview

* clean up

---------

Co-authored-by: Meghan Kulkarni <t-mekulkarni@microsoft.com>
2023-06-07 18:08:22 +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
e9262678fa Add drop feedback UX (#179434)
For #179430

Adds two new UX components:

- An inline progress icon shown when a drop operation takes over 500ms. This replaces the notification. You can click on it to cancel the drop

- Post drop, a drop feedback icon that lets you drop the file in a different way. This lets you drop the file as plain text for instance instead of as a markdown link
2023-04-11 13:48:24 -07:00
Matt Bierner
da15b03a10 Add setting to control markdown LS log level (#176472) 2023-03-08 08:00:34 +01:00
Matt Bierner
784bbdab8f Allowing configuring if markdown inserts a .md when completing paths to markdown files (#174882)
Fixes #174005
2023-02-21 08:07:31 +01:00
Matt Bierner
34c620efbe Hook up new markdown workspace header suggestion setting (#174004)
Fixes #172977

Also fixes the settingsTree matching settings ids too eagerly
2023-02-10 09:09:00 +01:00
Logan Ramos
8e6bcc9b9e Bump module to new package (#173599) 2023-02-06 12:29:36 -08:00
Matt Bierner
4630d8e4de Remove more implicit activation events from built-in extensions (#172838) 2023-01-30 17:25:56 -08:00