code-line-numbers
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -18,4 +18,5 @@ "use strict"; | ||
var digitsCount = ("" + lines.length).length; | ||
for (var n = 1; n <= lines.length; n++) { | ||
var numberWithZeros = "" + n; | ||
for (var n = 0; n < lines.length; n++) { | ||
var lineNumber = n + 1; | ||
var numberWithZeros = "" + lineNumber; | ||
if (numberWithZeros.length < digitsCount) { | ||
@@ -25,3 +26,3 @@ var zeros = ""; | ||
zeros += "0"; | ||
numberWithZeros = "<span class=\"code-line-numbers__number__zeros\">" + zeros + "</span>" + n; | ||
numberWithZeros = "<span class=\"code-line-numbers__number__zeros\">" + zeros + "</span>" + lineNumber; | ||
} | ||
@@ -28,0 +29,0 @@ lines[n] = "<span class=\"code-line-numbers__number\">" + numberWithZeros + "</span>" + lines[n]; |
{ | ||
"name": "code-line-numbers", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "Adding line numbers for code, HighLight.js is supported too", | ||
@@ -5,0 +5,0 @@ "main": "./dist/code-line-numbers.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6133
63