code wiki / hub / nx_doc_extractor_md.nx

nx_doc_extractor_md.nx

buildroot/runtime/hub/nx_doc_extractor_md.nx

5572 B153 linesdepth 3pulls 3 transitivereach 3 importersview sourcekind librarytopic doc
docsdependenciesstructsconstsfunctions

about

nx_doc_extractor_md.nx -- V2.0 P-7: deep .md artifact parser. Reads .md body bytes; extracts heading_count (## §N) + code_block_count (fenced blocks) for populating substrate signal richer than the V2.0 composes_count alone. COMPOSES: nx_html_extract.nx_he_match_ci (re-used by P-6) COMPOSED BY: wiki/nx_pipeline_walker (V3+ swap; V2.0 calls separately via main) V2.0 P-7 SCOPE: - Count "## " or "### " or higher-depth heading line-starts -> heading_count - Count code-fence pairs (```lang ... ```) -> code_block_count - Bounded; line-walker; pure-function V3+ SCOPE (TODO): - Identify [N]/[I]/[R] paragraph tags per NISHIDOC_STANDARD §3 - Extract section TOC (§N + title) - Detect S-class doc structure (frontmatter + numbered sections) - Count footnotes + references Status: V2.0 P-7. 2026-05-27.

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_html_extract.nx nx_doc_extractor_md.nx nx_pipeline_walker.nx

imports: nx_syscalls.nxnx_html_extract.nx

imported by: nx_pipeline_walker.nx

structs

none

consts

30const NX_DXMD_OK: i64 = 0
31const NX_DXMD_BAD_INPUT: i64 = 3030
32const NX_DXMD_LOOP_BUDGET: i64 = 3031
35const NX_DXMD_MAX_BODY: i64 = 4194304 // 4 MB cap (some specs are large)
36const NX_DXMD_LOOP_BUDGET_CAP: i64 = 10000000
38const NX_DXMD_ASCII_NL: i64 = 0x0A
39const NX_DXMD_ASCII_HASH: i64 = 0x23
40const NX_DXMD_ASCII_BACKTICK: i64 = 0x60

functions

47func nx_dxmd_line_is_heading(body: *u8, line_off: i64, body_n: i64) -> i64
80func nx_dxmd_line_is_fence(body: *u8, line_off: i64, body_n: i64) -> i64
105func nx_doc_extract_md_stats(body: *u8, body_n: i64,