mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 10:57:58 +00:00
api: Fix rendering of code blocks after clicking sidebar links.
We need to call `render_code_sections` to show the code block for the current language whenever switching which code block we're looking at.
This commit is contained in:
@@ -35,6 +35,7 @@ function render_code_sections() {
|
|||||||
$html.find(".back-to-home").remove();
|
$html.find(".back-to-home").remove();
|
||||||
|
|
||||||
callback($html.html().trim());
|
callback($html.html().trim());
|
||||||
|
render_code_sections();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -62,6 +63,7 @@ function render_code_sections() {
|
|||||||
if (html_map[path]) {
|
if (html_map[path]) {
|
||||||
$(".markdown .content").html(html_map[path]);
|
$(".markdown .content").html(html_map[path]);
|
||||||
Ps.update(container);
|
Ps.update(container);
|
||||||
|
render_code_sections();
|
||||||
} else {
|
} else {
|
||||||
loading.name = path;
|
loading.name = path;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user