isInsideFrontmatter() — astro Function Reference
Architecture documentation for the isInsideFrontmatter() function in utils.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD e8235076_7aae_155a_a798_972a05f6c177["isInsideFrontmatter()"] 839dada7_8bd4_2ee4_9498_f38d21d2f7e9["utils.ts"] e8235076_7aae_155a_a798_972a05f6c177 -->|defined in| 839dada7_8bd4_2ee4_9498_f38d21d2f7e9 style e8235076_7aae_155a_a798_972a05f6c177 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/language-tools/language-server/src/plugins/utils.ts lines 42–51
export function isInsideFrontmatter(offset: number, frontmatter: FrontmatterStatus) {
switch (frontmatter.status) {
case 'closed':
return offset > frontmatter.position.start.offset && offset < frontmatter.position.end.offset;
case 'open':
return offset > frontmatter.position.start.offset;
case 'doesnt-exist':
return false;
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does isInsideFrontmatter() do?
isInsideFrontmatter() is a function in the astro codebase, defined in packages/language-tools/language-server/src/plugins/utils.ts.
Where is isInsideFrontmatter() defined?
isInsideFrontmatter() is defined in packages/language-tools/language-server/src/plugins/utils.ts at line 42.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free