Splitting markdown files based on specified headers.
MarkdownHeaderTextSplitter(
self,
headers_to_split_on: list[tuple[str, str]],
return_each_line: bool = False,
strip_headers: bool = True,
custom_header_patterns: dict[str, int] | None = None
)| Name | Type | Description |
|---|---|---|
headers_to_split_on* | list[tuple[str, str]] | Headers we want to track |
return_each_line | bool | Default: FalseReturn each line w/ associated headers |
strip_headers | bool | Default: TrueStrip split headers from the content of the chunk |
custom_header_patterns | dict[str, int] | None | Default: NoneOptional dict mapping header patterns to their levels. For example: |