Skip to content

Commit 9f0fdcb

Browse files
authored
Merge pull request DeusData#2613 from bline/fix/doc-section-hierarchy
fix(markdown): qualify a repeated heading's Section by its parent headings (DeusData#2586)
2 parents 85a38ed + 0bd442c commit 9f0fdcb

4 files changed

Lines changed: 925 additions & 8 deletions

File tree

‎internal/cbm/cbm.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,8 @@ typedef struct {
863863
typedef struct CBMFileResult {
864864
CBMArena arena; // owns local memory; composites may also retain child arenas below
865865

866+
uint64_t markdown_collection_steps; // collector cursor moves/node visits, not parser internals
867+
uint64_t markdown_name_checks; // heading-name lookup/group checks, excluding sorting
866868
CBMDefArray defs;
867869
CBMCallArray calls;
868870
CBMImportArray imports;
@@ -1074,6 +1076,9 @@ typedef struct {
10741076
* POD section index. */
10751077
void *doc_memo;
10761078
void *doc_pod_index;
1079+
/* Markdown: the settled names of the file's headings (extract_defs.c),
1080+
* NULL until the first heading; allocated in `scratch`. */
1081+
void *md_headings;
10771082
const cbm_test_declarations_t *test_declarations; /* borrowed for this call only */
10781083
bool test_declarations_raw_source;
10791084
struct CBMTestDefinitionMatch *test_definition_matches; /* traversal scratch */

0 commit comments

Comments
 (0)