mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-16 00:49:40 +08:00
fix: 修复代码行号少一行的问题
This commit is contained in:
parent
74315be24c
commit
39c28fde7b
@ -42,7 +42,7 @@ const postContext = {
|
|||||||
}
|
}
|
||||||
// 生成行号
|
// 生成行号
|
||||||
let codes = $(this).text().split('\n') || []
|
let codes = $(this).text().split('\n') || []
|
||||||
let nums = codes.length - 1
|
let nums = codes.length
|
||||||
let lineDigit = String(nums).length
|
let lineDigit = String(nums).length
|
||||||
if (lineDigit === 1) lineDigit = 2
|
if (lineDigit === 1) lineDigit = 2
|
||||||
let lis = ''
|
let lis = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user