We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a5fc23 commit 9c61163Copy full SHA for 9c61163
html/js/ejs.js
@@ -58,6 +58,7 @@ window.addEventListener("load", function() {
58
};
59
60
var nextID = 0;
61
+ var article = document.getElementsByTagName("article")[0];
62
63
function activateCode(node, e, lang) {
64
var code = node.textContent;
@@ -69,7 +70,7 @@ window.addEventListener("load", function() {
69
70
matchBrackets: true,
71
lineNumbers: true
72
});
- wrap.style.margin = "1rem -5em";
73
+ wrap.style.marginLeft = wrap.style.marginRight = -Math.min(article.offsetLeft, 100) + "px";
74
setTimeout(function() { editor.refresh(); }, 600);
75
if (e) {
76
editor.setCursor(editor.coordsChar({left: e.clientX, top: e.clientY}, "client"));
0 commit comments