blockutil

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package blockutil provides shared helpers for container-style block directive parsers. Directives that open with a ":::name" fence and close with ":::" track how many nested container fences are currently open so that a closing fence is matched to the correct block.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteDepth

func DeleteDepth(pc parser.Context, node ast.Node)

DeleteDepth removes the depth entry for node.

func GetDepth

func GetDepth(pc parser.Context, node ast.Node) int

GetDepth returns the nesting depth recorded for node, or 0 if none.

func HasInnerOpenBlocks

func HasInnerOpenBlocks(pc parser.Context, node ast.Node) bool

HasInnerOpenBlocks reports whether a ':'-triggered container opened after node is still open, meaning a bare closing fence belongs to that inner container rather than to node.

func SetDepth

func SetDepth(pc parser.Context, node ast.Node, depth int)

SetDepth records the nesting depth for node.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL