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:
Tim Abbott 2017-10-30 22:53:41 -07:00
parent f01f596138
commit 3104d3ea3e
1 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,7 @@ function render_code_sections() {
$html.find(".back-to-home").remove();
callback($html.html().trim());
render_code_sections();
});
};
@ -62,6 +63,7 @@ function render_code_sections() {
if (html_map[path]) {
$(".markdown .content").html(html_map[path]);
Ps.update(container);
render_code_sections();
} else {
loading.name = path;