Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1x 1x 1x 1x 1x 1x | import { validateWikiContent } from './validate-wiki-content';
import { Diagnostic, linter, lintGutter, lintKeymap } from '@codemirror/lint';
import { EditorView, keymap } from '@codemirror/view';
function wikiLintSource(view: EditorView): readonly Diagnostic[] {
return validateWikiContent(view.state.doc.toString()).map(err => ({
from: err.from,
to: err.to,
severity: err.severity,
message: err.message,
}));
}
export const wikiLinter = linter(wikiLintSource);
export const wikiLintGutter = lintGutter();
export const wikiLintKeymap = keymap.of(lintKeymap);
|