]>
git.r.bdr.sh - rbdr/dotfiles/blob - atom/packages/pretty-json/node_modules/jsonminify/docs/scripts/linenumber.js
4 var source
= document
.getElementsByClassName('prettyprint source');
6 if (source
&& source
[0]) {
7 source
= source
[0].getElementsByTagName('code')[0];
9 numbered
= source
.innerHTML
.split('\n');
10 numbered
= numbered
.map(function(item
) {
12 return '<span id="line' + counter
+ '" class="line"></span>' + item
;
15 source
.innerHTML
= numbered
.join('\n');