diff --git a/css/zerobin.css b/css/zerobin.css index 2bd230bb..f3d76815 100644 --- a/css/zerobin.css +++ b/css/zerobin.css @@ -365,4 +365,25 @@ pre a:hover { color:#64B9C6; } +/* +pre { + counter-reset: lines; +} + +pre .line { + counter-increment: lines; +} +pre .line::before { + content: counter(lines); text-align: right; + display: inline-block; width: 2em; + padding-right: 0.5em; margin-right: 0.5em; + color: #BBB; border-right: solid 1px; +} +*/ +pre ol { +list-style:decimal outside none; +} +pre ol li { +font-weight: normal; vertical-align:top; +} diff --git a/js/zerobin.js b/js/zerobin.js index a9b6c1d9..76b20de7 100644 --- a/js/zerobin.js +++ b/js/zerobin.js @@ -182,6 +182,13 @@ function applySyntaxColoring() $('div#cleartext').css('padding','0'); // Remove white padding around code box. } +function addLineNumbers() { + cleartext = $('div#cleartext > pre > code'); + newtext = cleartext.html() + .replace( /(\r?\n)/g, "$1