nx_doc_extractor_md.nx
buildroot/runtime/hub/nx_doc_extractor_md.nx
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
imports: nx_syscalls.nxnx_html_extract.nx
imported by: nx_pipeline_walker.nx
structs
| none |
consts
| 30 | const NX_DXMD_OK: i64 = 0 |
| 31 | const NX_DXMD_BAD_INPUT: i64 = 3030 |
| 32 | const NX_DXMD_LOOP_BUDGET: i64 = 3031 |
| 35 | const NX_DXMD_MAX_BODY: i64 = 4194304 // 4 MB cap (some specs are large) |
| 36 | const NX_DXMD_LOOP_BUDGET_CAP: i64 = 10000000 |
| 38 | const NX_DXMD_ASCII_NL: i64 = 0x0A |
| 39 | const NX_DXMD_ASCII_HASH: i64 = 0x23 |
| 40 | const NX_DXMD_ASCII_BACKTICK: i64 = 0x60 |
functions
| 47 | func nx_dxmd_line_is_heading(body: *u8, line_off: i64, body_n: i64) -> i64 called by 1: nx_doc_extract_md_stats |
| 80 | func nx_dxmd_line_is_fence(body: *u8, line_off: i64, body_n: i64) -> i64 called by 1: nx_doc_extract_md_stats |
| 105 | func nx_doc_extract_md_stats(body: *u8, body_n: i64, |