* Line ranges (0-indexed, inclusive) the template scans must skip: * the frontmatter block and / blocks.
(
frontmatter: { startLine: number; endLine: number } | null
)
| 219 | * the frontmatter block and <script>/<style> blocks. |
| 220 | */ |
| 221 | private getCoveredRanges( |
| 222 | frontmatter: { startLine: number; endLine: number } | null |
| 223 | ): Array<[number, number]> { |
| 224 | const coveredRanges: Array<[number, number]> = []; |
| 225 | |
| 226 | if (frontmatter) { |
| 227 | // Cover from the opening fence line through the closing fence line |
| 228 | coveredRanges.push([frontmatter.startLine - 1, frontmatter.endLine]); |
| 229 | } |
| 230 | |
| 231 | // A self-closing tag covers nothing: its attributes |
| 232 | // (`set:html={serializeJsonLd(schema)}`) are template expressions. |
| 233 | coveredRanges.push(...sfcBlockLineRanges(this.source)); |
| 234 | |
| 235 | return coveredRanges; |
| 236 | } |
| 237 | |
| 238 | /** |
| 239 | * Extract function calls from Astro template expressions. |
no test coverage detected