mirror of
https://github.com/seejohnrun/haste-server
synced 2025-08-21 05:44:16 -07:00
Update code tag
This commit is contained in:
parent
f9f2494fbb
commit
ff1ca863fa
4 changed files with 20 additions and 12 deletions
|
@ -171,7 +171,7 @@ haste.prototype.lookupTypeByExtension = function(ext) {
|
|||
// For the specified number of lines
|
||||
haste.prototype.addLineNumbers = function(lineCount) {
|
||||
removeElementsByClass('linenumber');
|
||||
for (var i = 0; i < lineCount; i++) {
|
||||
/*for (var i = 0; i < lineCount; i++) {
|
||||
let div = document.createElement('a');
|
||||
div.classList.add('linenumber');
|
||||
div.style.marginTop = i * 16 + 'px';
|
||||
|
@ -194,7 +194,7 @@ haste.prototype.addLineNumbers = function(lineCount) {
|
|||
behavior: 'smooth',
|
||||
block: 'center'
|
||||
});*/
|
||||
}
|
||||
//}
|
||||
};
|
||||
|
||||
function highlightLine(line) {
|
||||
|
|
2
static/application.min.js
vendored
2
static/application.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -76,7 +76,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<pre id="box" style="display:none;" class="hljs" tabindex="0"></pre>
|
||||
<pre id="box" style="display:none;" class="code" tabindex="0"></pre>
|
||||
<textarea spellcheck="false" style="display:none;"></textarea>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -12,22 +12,30 @@ Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmai
|
|||
color: #78797A;
|
||||
}*/
|
||||
|
||||
pre.hljs {
|
||||
pre.code {
|
||||
white-space: pre-wrap;
|
||||
margin-left: 8em;
|
||||
}
|
||||
pre.hljs::before {
|
||||
|
||||
pre.code::before {
|
||||
counter-reset: listing;
|
||||
}
|
||||
pre.hljs code {
|
||||
|
||||
pre.code code {
|
||||
counter-increment: listing;
|
||||
text-align: left;
|
||||
float: left;
|
||||
clear: left;
|
||||
}
|
||||
pre.hljs code::before {
|
||||
|
||||
pre.code code::before {
|
||||
content: counter(listing) ". ";
|
||||
display: inline-block;
|
||||
width: 8em; /* now works */
|
||||
padding-left: auto; /* now works */
|
||||
margin-left: auto; /* now works */
|
||||
text-align: right; /* now works */
|
||||
float: left;
|
||||
height: 3em;
|
||||
padding-left: auto;
|
||||
margin-left: auto;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue