mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-06-22 04:58:40 +00:00
lint
This commit is contained in:
@@ -17,13 +17,13 @@ import {
|
|||||||
crosshairCursor,
|
crosshairCursor,
|
||||||
} from '@codemirror/view';
|
} from '@codemirror/view';
|
||||||
import { EditorState, Compartment, StateEffect, StateField } from '@codemirror/state';
|
import { EditorState, Compartment, StateEffect, StateField } from '@codemirror/state';
|
||||||
import {
|
import {
|
||||||
foldAll as foldAllCmd,
|
foldAll as foldAllCmd,
|
||||||
unfoldAll as unfoldAllCmd,
|
unfoldAll as unfoldAllCmd,
|
||||||
foldGutter,
|
foldGutter,
|
||||||
foldKeymap,
|
foldKeymap,
|
||||||
foldEffect,
|
foldEffect,
|
||||||
foldState,
|
foldState,
|
||||||
syntaxHighlighting,
|
syntaxHighlighting,
|
||||||
syntaxTree,
|
syntaxTree,
|
||||||
ensureSyntaxTree
|
ensureSyntaxTree
|
||||||
@@ -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)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user