Remove language::markdown (#25136)
The language::markdown crate had been superceded by markdown::Mardown. After #25117, the only two remaining use-cases were rendering git commit messages (which are arguably not really markdown) and the signature help (which is definitely not markdown). Updated the former to use the new markdown component, and the latter to do syntax highlighting manually. Release Notes: - Allow selecting the commit message in git commits
This commit is contained in:
@@ -46,7 +46,7 @@ pub fn main() {
|
||||
Assets.load_fonts(cx).unwrap();
|
||||
|
||||
cx.activate(true);
|
||||
cx.open_window(WindowOptions::default(), |window, cx| {
|
||||
cx.open_window(WindowOptions::default(), |_, cx| {
|
||||
cx.new(|cx| {
|
||||
let markdown_style = MarkdownStyle {
|
||||
base_text_style: gpui::TextStyle {
|
||||
@@ -92,7 +92,6 @@ pub fn main() {
|
||||
MARKDOWN_EXAMPLE.into(),
|
||||
markdown_style,
|
||||
language_registry,
|
||||
window,
|
||||
cx,
|
||||
)
|
||||
})
|
||||
@@ -110,7 +109,6 @@ impl MarkdownExample {
|
||||
text: SharedString,
|
||||
style: MarkdownStyle,
|
||||
language_registry: Arc<LanguageRegistry>,
|
||||
window: &mut Window,
|
||||
cx: &mut App,
|
||||
) -> Self {
|
||||
let markdown = cx.new(|cx| {
|
||||
@@ -119,7 +117,6 @@ impl MarkdownExample {
|
||||
style,
|
||||
Some(language_registry),
|
||||
Some("TypeScript".to_string()),
|
||||
window,
|
||||
cx,
|
||||
)
|
||||
});
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn main() {
|
||||
Assets.load_fonts(cx).unwrap();
|
||||
|
||||
cx.activate(true);
|
||||
let _ = cx.open_window(WindowOptions::default(), |window, cx| {
|
||||
let _ = cx.open_window(WindowOptions::default(), |_, cx| {
|
||||
cx.new(|cx| {
|
||||
let markdown_style = MarkdownStyle {
|
||||
base_text_style: gpui::TextStyle {
|
||||
@@ -86,14 +86,7 @@ pub fn main() {
|
||||
heading: Default::default(),
|
||||
};
|
||||
let markdown = cx.new(|cx| {
|
||||
Markdown::new(
|
||||
MARKDOWN_EXAMPLE.into(),
|
||||
markdown_style,
|
||||
None,
|
||||
None,
|
||||
window,
|
||||
cx,
|
||||
)
|
||||
Markdown::new(MARKDOWN_EXAMPLE.into(), markdown_style, None, None, cx)
|
||||
});
|
||||
|
||||
HelloWorld { markdown }
|
||||
|
||||
Reference in New Issue
Block a user