mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 02:05:21 -04:00
refactor: change return type of frontmatter extractor to use undefined
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
77f858bff8
commit
4d0a2cb79e
5 changed files with 29 additions and 56 deletions
|
@ -20,7 +20,7 @@ export class FrontmatterLinter implements Linter {
|
|||
lint(view: EditorView): Diagnostic[] {
|
||||
const lines = view.state.doc.toString().split('\n')
|
||||
const frontmatterExtraction = extractFrontmatter(lines)
|
||||
if (!frontmatterExtraction.isPresent) {
|
||||
if (frontmatterExtraction === undefined) {
|
||||
return []
|
||||
}
|
||||
const startOfYaml = lines[0].length + 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue