There was an error while loading. Please reload this page.
1 parent 6c0b996 commit d207e6bCopy full SHA for d207e6b
1 file changed
assets/nav.js
@@ -134,9 +134,11 @@
134
lineNumbers: false,
135
lineWrapping: false,
136
});
137
- cm.setSize('100%', 'auto');
138
- cm.getWrapperElement().style.height = 'auto';
139
- cm.getScrollerElement().style.overflowY = 'visible';
+ // Force full height - CM defaults to 300px
+ const lineCount = cm.lineCount();
+ const lineHeight = 18;
140
+ const height = lineCount * lineHeight + 10;
141
+ cm.setSize('100%', height + 'px');
142
143
// Switch theme on dark toggle
144
document.querySelectorAll('.CodeMirror').forEach(el => {
0 commit comments