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
* added support for markdown fenced math blocks
* original markdownEngine.ts
* Add fenced math block rendering to markdown-math
* Update dependencies
* custom parser for fenced math blocks
* custom parser for fenced math blocks
* reverted changes to extension.ts
* reverted all changes from prior implementations
* proper fence grammar implementation for math
---------
Co-authored-by: Matt Bierner <matb@microsoft.com>
Fixes#188863Fixes#188958Fixes#188868
This is more reliable than using the regular expressions. However the regular expressions are still needed for inline elements
Fixes#198183
Remove extra background and also removes the extra divs inside of the code blocks as these were causing issues with styling (extra padding)
* Use MD LS for resolving all document links
This switches the markdown extension to use the markdown language service when resolving the link. This lets us delete a lot of code that was duplicated between the extension and the LS
* Pick up new ls version
Renames in the markdown extension
This renames some types and splits up some files as part of an exploration towards a proper LSP. Changes:
- `SkinnyTextDocument` -> `ITextDocument`
- Moved `ITextDocument` to own file
- `MdWorkspaceContents` -> `IMdWorkspace`
* Reduce recomputation of state in markdown extension
- Use `getForDocument` more often to avoid refetching documents
- Debounce `MdTableOfContentsWatcher`. We don't want this to trigger on every keystroke :)
* Cache LinkDefinitionSet
* Add test file change
* Fix toc watcher for tests
This change reduces the number of times we retokenize a markdown file by doing the following:
- Use `MdTableOfContentsProvider` in more places
- Introduce a `IMarkdownParser` interface that lets us drop in a caching version of the tokenizer
(sorry for the size of this PR)
This change cleans up the markdown language features by making the following changes:
- Use `registerXSupport` public functions to register these
- Expose the slugifier the `MarkdownEngine` uses. You never want to use a different one if you already have a markdown engine
- Sort of clean up names. I'd introduced a bunch of confusing names while iterating in this space. What I'm working towards:
- `Computer` — Stateless thing that computer data
- `Provider` — Potentially stateful thing that provides data (which may be cached)
- `VsCodeProvider` — The actual implementation of the various vscode language features (which should only be used by VS Code and in tests, not shared with other features)
- Introduce `MdLinkProvider` to avoid recomputing links for a given document. Also use this to hide more internals of link computation
## Problem
Webview uris currently have the form:
```
https://uuid.vscode-webview.net/vscode-resource/scheme/authority/path...
```
We have this syntax because we need to be able to recover the original scheme and authority of the resource in order to load it from disk
However this syntax means that absolute urls don't behave as you'd expect. For example, if you have a webview that sets a `<base>` to a document in the workspace, an absolute url `/abs/path.png` ends up being resolved to:
```
https://uuid.vscode-webview.net/abs/path.png
```
This drops the original scheme and authority, which prevents us from loading the resource
## Fix
With this change, I've moved the original scheme and authority into the authority of the webview uri instead of the path:
```
https://scheme+authority.vscode-resource.uuid.vscode-webview.net/path...
```
With this change, absolute paths should correctly be resolved