Fixes#8488
**Bug**
Currently there is no indication in the markdown preview when a `markdown.styles` element fails to load
**Fix**
Show an alert then a stylesheet does not load
**Bug**
Most VSCode extensions currently specify `"exclude"` in their `tsconfig.json` but not `"include"`. This may result in extra files being included in each project
**Fix**
Add `"include": ["src/**/*"]` to all extension tsconfig files
Fixes#24808
**bug**
Markdown preview updates when you zoom. The root cause is that previews are updated whenever the config is changed.
**Fix**
Extract preview config to its own well defined object. Only update the preview when the keys we care about in the config change
Fixes#21511Fixes#23922
Changes the default markdown toolbar item to open the preview to the side of the current file as requested by #21511
Also updates the single file preview icon slightly to better differentiate it from the diff icon
Two changes:
* Changes the logic from 41467b74b7 to make the padding customizable. The default 20px padding is preserved, but now preview can customize if they want to use it or not. This allows html preview page background colors to correctly fill the entire frame.
* Remove Writing the `_defaultStyles` to the root of the webview elment. These are only needed inside of the iFrame itself
* Prototype Allowing Extensions to Extend the Builtin Markdown Extension
**Problem**
There have been requests for adding new functionality to the markdown extension preview, such as supporting rendering of math or other syntax in the preview. The only current solution to this is create an extension that provides its own markdown preview. This results in inconsitent behavior with our markdown preview and is not a very scalable approach. We would like to find a way to allow users to add these extensions to our markdown preview without bundling the extensions in the preview itself.
**Fix**
Prototypes a new contribution point that extensions can use to extend the vscode markdown extension. Three types of extensions are possible: adding stypes to the preview, adding scripts to the preview, and extending the markdown it renderer.
My current approach defines the contributed markdown extensions in the package.json using a structure like this:
```
"contributesTo": {
"vscode.markdown": {
"plugins": [
"./out/math"
],
"scripts": [],
"styles": [
"./media/math.css"
]
}
}
```
We could change the structure here. This design uses a pull model where markdown extensions are looked up by the vscode.markdown extension itself.
The other approach for extension registration would be to use a push model. This would have the vscode.markdown extension export an api that each markdown extension would invoke to register new scripts/styles/plugins. I may switch over to this model but was interested in seeing what a more declarative approach would look like. Let me know if you have any thoughts one way or the other.
The downside of allowing extensions like this is that they can completely change how the markdown preview looks and works. There is no well defined API for restricting what extensions can do like we have with VScode.
* Use extensionDependencies
* Remove example extension
* Added gating and activation event
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.