Skip to content

Commit 4a91030

Browse files
Merge pull request #808 from OHDSI/MaximMoinat-patch-3
fix rendering section headers in specification
2 parents ba3dc1b + 2ed8452 commit 4a91030

6 files changed

Lines changed: 394 additions & 275 deletions

File tree

‎docs/cdm30.html‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@
241241
toggleColorMode(toAlternate);
242242
setStyleSentinel(toAlternate);
243243
toggleGiscusIfUsed(toAlternate, darkModeDefault);
244+
window.dispatchEvent(new Event('resize'));
244245
};
245246
// Switch to dark mode if need be
246247
if (hasAlternateSentinel()) {
@@ -256,7 +257,8 @@
256257
<div class="navbar-container container-fluid">
257258
<div class="navbar-brand-container mx-auto">
258259
<a href="./index.html" class="navbar-brand navbar-brand-logo">
259-
<img src="./man/ohdsi16x16.png" alt="" class="navbar-logo">
260+
<img src="./man/ohdsi16x16.png" alt="" class="navbar-logo light-content">
261+
<img src="./man/ohdsi16x16.png" alt="" class="navbar-logo dark-content">
260262
</a>
261263
<a class="navbar-brand" href="./index.html">
262264
<span class="navbar-title">OMOP Common Data Model</span>
@@ -553,13 +555,14 @@ <h1 class="title">CDM v3</h1>
553555
e.clearSelection();
554556
}
555557
const getTextToCopy = function(trigger) {
556-
const codeEl = trigger.previousElementSibling.cloneNode(true);
557-
for (const childEl of codeEl.children) {
558-
if (isCodeAnnotation(childEl)) {
559-
childEl.remove();
560-
}
558+
const outerScaffold = trigger.parentElement.cloneNode(true);
559+
const codeEl = outerScaffold.querySelector('code');
560+
for (const childEl of codeEl.children) {
561+
if (isCodeAnnotation(childEl)) {
562+
childEl.remove();
561563
}
562-
return codeEl.innerText;
564+
}
565+
return codeEl.innerText;
563566
}
564567
const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', {
565568
text: getTextToCopy

0 commit comments

Comments
 (0)