Closed pixeldesu closed 1 year ago
The highlight is now missing on the start page.
It could be added in KssMarkup.prototype.init
as the example below.
var docsHighlights = document.querySelectorAll('pre.hljs');
for (var docsHighlight of docsHighlights) {
self.highlightMarkup(docsHighlight);
}
I recently noticed that large styleguides (or even just styleguide sections) would freeze my entire browser.
I did some performance profiling and found out that the reasoning behind it is the syntax highlighting of PrismJS being applied to all markup sections on load.
This Pull Request disables automatic highlighting (using the
data-manual
attribute) and adds methods and events to trigger rendering when required.