mirror of
https://github.com/seejohnrun/haste-server.git
synced 2024-11-22 20:51:21 +00:00
avoid generation of multiple divs
This commit is contained in:
parent
e8f05c0df2
commit
60e63ff28f
2 changed files with 3 additions and 3 deletions
|
@ -208,8 +208,7 @@ haste.prototype.addLineNumbers = function(data) {
|
|||
};
|
||||
|
||||
haste.prototype.getCharacterWidth = function() {
|
||||
var $div = $("<div></div>");
|
||||
$("body").append($div);
|
||||
var $div = $("#sandbox");
|
||||
$div.html('a');
|
||||
$div.css('width','auto')
|
||||
.css('font', $("code").css('font'))
|
||||
|
|
|
@ -63,7 +63,8 @@
|
|||
<div id="linenos"></div>
|
||||
<pre id="box" style="display:none;" tabindex="0"><code></code></pre>
|
||||
<textarea spellcheck="false" style="display:none;"></textarea>
|
||||
|
||||
<div id="sandbox">
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue