Fixes#22494
**Bug**
References without a definition can cause the markdown table of contents provider to break
**Fix**
Pass in an empty environment to markdown-it `parse` to prevent the null dereference on invalid links.
**Bug**
The markdown grammar for fenced code blocks is rather unmaintainable since it involves lots of copy and pasted code
**Fix**
Use a gulp task and a template to generate the fenced code block grammars include directly. This allows adding new language support much more easily.
Adds enhanced security settings for the markdown preview. The new flow disable all scripts within the preview itself. Users can enable scripts on a per workspace basis.
When a markdown document that uses scripts is loaded, a warning is shown inside the document itself. This warning triggers a new security selector quick pick which allows users to enable or disable enahanced security in the workspace.
Fixes#7776
**Bug**
Code blocks in the markdown preview are not very good looking
**Fix**
Use default text color for indented code blocks and add a background
Fixes#20070
**Bug**
Markdown scroll sync and other sync features do not work for untitled files. The root cause seems to be that the `main.js` markdown file is never loaded
**Fix**
Instead of a using a path without a scheme for `main.js`, use a `file://` path
**Bug**
Scroll sync not working for some users on windows
**Fix**
Root cause seems to be that windows drive/path cases can sometimes differ between preview and editor document. Adds a equality check based on `fsPath` as well
**Bug**
For long/not-terminated frontmatter in a markdown file, we can currently hang the process while trying match it using a regular expression
**Fix**
Use a more efficent regexp to do this.
* Remove unneeded d.ts files from extensions
Moves most extensions to use the lib files for the standard library that typescript provides.
* Remove a few more node.d.ts references
**Bug**
When refreshing a webview, a slight flicker can sometime be seen. This is especially noticable when using the markdown preview.
**Fix**
Instead of replacing the content of the iframe for refresh, create a new iframe with the new content and do a swap to update.