Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ function createLiSection(obj, sectionId, h3Text) {

languageListItems(obj, lang, h3Text, section, grid, secondaryChild);
})

// Re-apply Prism.js highlighting only to this section
Prism.highlightAllUnder(section);
}

// HELPER function: used in createLiSection
Expand All @@ -87,7 +90,7 @@ function languageListItems(obj, string, text, el1, el2, el3) {
obj[string].forEach(item => {
const li = document.createElement('li');
const code = document.createElement('code');
code.className = `custom-${string.toLowerCase()}`;
code.className = `language-${string.toLowerCase()}`;
code.textContent = item;
li.append(code);
list.append(li);
Expand Down