markdown preview: Improve live preview (#10205)

This PR contains various improvements for the markdown preview (some of
which were originally part of #7601).
Some improvements can be seen in the video (see also release notes down
below):


https://github.com/zed-industries/zed/assets/53836821/93324ee8-d366-464a-9728-981eddbfdaf7

Release Notes:
- Added action to open markdown preview in the same pane
- Added support for displaying channel notes in markdown preview
- Added support for displaying the current active editor when opening
markdown preview
- Added support for scrolling the editor to the corresponding block when
double clicking an element in markdown preview
- Improved pane creation handling when opening markdown preview
- Fixed markdown preview displaying non-markdown files
This commit is contained in:
Bennet Bo Fenner 2024-04-08 21:17:40 +02:00 committed by GitHub
parent d009d84ead
commit 7dccbd8e3b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 295 additions and 109 deletions

View file

@ -270,7 +270,7 @@ impl<'a> MarkdownParser<'a> {
regions.push(ParsedRegion {
code: false,
link: Some(Link::Web {
url: t[range].to_string(),
url: link.as_str().to_string(),
}),
});