0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-06-26 02:08:45 +00:00
This commit is contained in:
Víctor Losada Hernández
2026-05-10 19:39:26 +02:00
parent 793adafe32
commit 70d9614fb1
+2 -18
View File
@@ -152,30 +152,14 @@ const createHighlightPlugin = (renderer, tab)=>{
class : `cm-${tok.type}` class : `cm-${tok.type}`
}).range(line.from) }).range(line.from)
); );
if(tok.type === 'pageLine' && tab === 'brewText') { if(tok.type === 'pageLine' && tab === 'brewText') {
pageCount++; pageCount++;
if(line.from === 0) pageCount--; if(line.from === 0) pageCount--;
decos.push(Decoration.line({ attributes: { 'data-page-number': pageCount } }).range(line.from));
decos.push(
Decoration.line({
attributes : {
'data-page-number' : pageCount
}
}).range(line.from)
);
} }
if(tok.type === 'snippetLine' && tab === 'brewSnippets') { if(tok.type === 'snippetLine' && tab === 'brewSnippets') {
snippetCount++; snippetCount++;
decos.push(Decoration.line({ attributes: { 'data-page-number': snippetCount } }).range(line.from));
decos.push(
Decoration.line({
attributes : {
'data-page-number' : snippetCount
}
}).range(line.from)
);
} }
} }
}); });