markdown: Make cx
the last parameter to the constructor (#21487)
I noticed that `Markdown::new` didn't have the `cx` as the final parameter, as is conventional. This PR fixes that. Release Notes: - N/A
This commit is contained in:
parent
165d50ff5b
commit
88b0d3c78e
4 changed files with 4 additions and 4 deletions
|
@ -593,8 +593,8 @@ async fn parse_blocks(
|
||||||
combined_text,
|
combined_text,
|
||||||
markdown_style.clone(),
|
markdown_style.clone(),
|
||||||
Some(language_registry.clone()),
|
Some(language_registry.clone()),
|
||||||
cx,
|
|
||||||
fallback_language_name,
|
fallback_language_name,
|
||||||
|
cx,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.ok();
|
.ok();
|
||||||
|
|
|
@ -178,7 +178,7 @@ impl MarkdownExample {
|
||||||
cx: &mut WindowContext,
|
cx: &mut WindowContext,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let markdown =
|
let markdown =
|
||||||
cx.new_view(|cx| Markdown::new(text, style, Some(language_registry), cx, None));
|
cx.new_view(|cx| Markdown::new(text, style, Some(language_registry), None, cx));
|
||||||
Self { markdown }
|
Self { markdown }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ pub fn main() {
|
||||||
heading: Default::default(),
|
heading: Default::default(),
|
||||||
};
|
};
|
||||||
let markdown = cx.new_view(|cx| {
|
let markdown = cx.new_view(|cx| {
|
||||||
Markdown::new(MARKDOWN_EXAMPLE.into(), markdown_style, None, cx, None)
|
Markdown::new(MARKDOWN_EXAMPLE.into(), markdown_style, None, None, cx)
|
||||||
});
|
});
|
||||||
|
|
||||||
HelloWorld { markdown }
|
HelloWorld { markdown }
|
||||||
|
|
|
@ -71,8 +71,8 @@ impl Markdown {
|
||||||
source: String,
|
source: String,
|
||||||
style: MarkdownStyle,
|
style: MarkdownStyle,
|
||||||
language_registry: Option<Arc<LanguageRegistry>>,
|
language_registry: Option<Arc<LanguageRegistry>>,
|
||||||
cx: &ViewContext<Self>,
|
|
||||||
fallback_code_block_language: Option<String>,
|
fallback_code_block_language: Option<String>,
|
||||||
|
cx: &ViewContext<Self>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let focus_handle = cx.focus_handle();
|
let focus_handle = cx.focus_handle();
|
||||||
let mut this = Self {
|
let mut this = Self {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue