/** * -------------------------------------------------------------------- * docmd : the zero-config documentation engine. * * @package @docmd/core (and ecosystem) * @website https://docmd.io * @repository https://github.com/docmd-io/docmd * @license MIT * @copyright Copyright (c) 2025-present docmd.io * * [docmd-source] - Please do not remove this header. * -------------------------------------------------------------------- */ /** * Creates a depth-tracking container block rule for markdown-it. * Handles arbitrary nesting of `:::` containers by tracking open/close depth. * * @example * ```ts * import { createDepthTrackingContainer } from '@docmd/parser'; * * createDepthTrackingContainer(md, 'note', * (tokens, idx) => `