(depth: number, lastSemanticLevel: number)
| 439 | // For deeper levels, ensure sequential order |
| 440 | // Don't allow jumping more than 1 level deeper than previous |
| 441 | export function calculateSemanticDepth(depth: number, lastSemanticLevel: number) { |
| 442 | if (depth === 1) return 3 |
| 443 | const maxAllowed = Math.min(lastSemanticLevel + 1, 6) |
| 444 | return Math.min(depth + 2, maxAllowed) |
| 445 | } |
| 446 | |
| 447 | /** |
| 448 | * Render YAML frontmatter as a GitHub-style key-value table. |
no outgoing calls
no test coverage detected