assets/js/just-the-docs.js in just-the-docs-0.4.0.rc4 vs assets/js/just-the-docs.js in just-the-docs-0.4.0.rc5

- old
+ new

@@ -85,10 +85,11 @@ this.field('relUrl'); {%- endif %} this.metadataWhitelist = ['position'] for (var i in docs) { + {% include lunr/custom-index.js %} this.add({ id: i, title: docs[i].title, content: docs[i].content, {%- if site.search.rel_url != false %} @@ -501,10 +502,10 @@ copyButton.innerHTML = svgCopy; codeBlock.append(copyButton); copyButton.addEventListener('click', function () { if(timeout === null) { - var code = codeBlock.querySelector('pre:not(.lineno)').innerText; + var code = (codeBlock.querySelector('pre:not(.lineno, .highlight)') || codeBlock.querySelector('code')).innerText; window.navigator.clipboard.writeText(code); copyButton.innerHTML = svgCopied; var timeoutSetting = 4000;