Skip to content

Commit

Permalink
Merge pull request #750 from edongashi/edon/frontmatter-position
Browse files Browse the repository at this point in the history
fix: use frontmatterPosition end line
  • Loading branch information
chhoumann authored Nov 3, 2024
2 parents 6a2b131 + 1119b60 commit c521c29
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/formatters/captureChoiceFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,9 @@ export class CaptureChoiceFormatter extends CompleteFormatter {
return -1;
}

if (fileCache.frontmatter.position || fileCache.frontmatterPosition) {
if (fileCache.frontmatter.position) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access
return fileCache.frontmatter.position.end.line;
}
if (fileCache.frontmatterPosition) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access
return fileCache.frontmatterPosition.end.line;
}

return -1;
Expand Down

0 comments on commit c521c29

Please sign in to comment.