mirror of
https://github.com/amehime/hexo-renderer-multi-markdown-it.git
synced 2026-04-05 13:09:04 +08:00
update
This commit is contained in:
@@ -68,21 +68,25 @@ module.exports = function (md, options) {
|
||||
|
||||
for (let i = 0, len = lines.length; i < len; i++) {
|
||||
let line = lines[i];
|
||||
let append = '';
|
||||
|
||||
let lineno = Number(firstLine) + i
|
||||
|
||||
numbers += `<span class="line">${lineno}</span><br>`;
|
||||
|
||||
content += '<span class="line';
|
||||
|
||||
if (mark && mark.includes(lineno)) {
|
||||
content += ` marked`;
|
||||
append = `<span class="marked`;
|
||||
}
|
||||
if (command && command[lineno]) {
|
||||
content += `" data-command="${command[lineno]}`;
|
||||
append += `" data-command="${command[lineno]}`;
|
||||
}
|
||||
|
||||
content += `">${line}</span><br>`;
|
||||
if (append) {
|
||||
content += `${append}${line}</span><br>`;
|
||||
} else {
|
||||
content += `${line}<br>`;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
let result = `<figure class="highlight${langToUse ? ` ${langToUse}` : ''}">`;
|
||||
|
||||
Reference in New Issue
Block a user