fix: 修复代码行号少一行的问题

This commit is contained in:
mjsoftware 2024-02-05 18:15:12 +08:00
parent 74315be24c
commit 39c28fde7b

View File

@ -42,7 +42,7 @@ const postContext = {
}
// 生成行号
let codes = $(this).text().split('\n') || []
let nums = codes.length - 1
let nums = codes.length
let lineDigit = String(nums).length
if (lineDigit === 1) lineDigit = 2
let lis = ''