As a developer,
I would like the extract_md_blocks function to return each code block along with its associated language type and starting line number,
to enable more detailed parsing, indexing, and processing of markdown files.
Background
Currently, extract_md_blocks only extracts the content inside fenced code blocks. However, for more advanced applications (such as syntax-aware parsing, error localization, and automated documentation generation), it is necessary to know additional metadata about each block, including the programming language declared (if any) and the line number where the block appears in the source markdown.
Acceptance Criteria
Background
Currently,
extract_md_blocksonly extracts the content inside fenced code blocks. However, for more advanced applications (such as syntax-aware parsing, error localization, and automated documentation generation), it is necessary to know additional metadata about each block, including the programming language declared (if any) and the line number where the block appears in the source markdown.Acceptance Criteria
content: The code block content as a string.language: The language identifier if specified; otherwiseNone.start_line: The 1-based line number in the original markdown text where the block starts.languagefield is set toNone.