Skip to content

Commit 86bbd4c

Browse files
committed
Merge pull request #668 from ryanzec/gh-pages
changed parseFloat to parseInt to prevent some inconsistency issue with different font sizes
2 parents 95dc102 + cba0345 commit 86bbd4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/line-highlight/prism-line-highlight.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function highlightLines(pre, lines, classes) {
1919
var ranges = lines.replace(/\s+/g, '').split(','),
2020
offset = +pre.getAttribute('data-line-offset') || 0;
2121

22-
var lineHeight = parseFloat(getComputedStyle(pre).lineHeight);
22+
var lineHeight = parseInt(getComputedStyle(pre).lineHeight);
2323

2424
for (var i=0, range; range = ranges[i++];) {
2525
range = range.split('-');

0 commit comments

Comments
 (0)