diff --git a/components/document/transformer/splitter/markdown/header.go b/components/document/transformer/splitter/markdown/header.go index 52b196d..6d46840 100644 --- a/components/document/transformer/splitter/markdown/header.go +++ b/components/document/transformer/splitter/markdown/header.go @@ -29,25 +29,25 @@ type HeaderConfig struct { // Headers specify the headers to be identified and their names in document metadata. // Headers can only consist of '#'. // e.g. - // // the Header Config: - // config := &HeaderConfig{ - // Headers: map[string]string{ "##": "headerNameOfLevel2" }, + // // the Header Config: + // config := &HeaderConfig{ + // Headers: map[string]string{ "##": "headerNameOfLevel2" }, // TrimHeaders: false, - // } + // } // - // // the original document: - // originDoc := &schema.Document{ - // Content: "hell\n##Title 2\n hello world", - // } + // // the original document: + // originDoc := &schema.Document{ + // Content: "hell\n##Title 2\n hello world", + // } // - // // one of the split documents: - // splitDoc := &schema.Document{ - // Content: "##Title 2\n hello world", + // // one of the split documents: + // splitDoc := &schema.Document{ + // Content: "##Title 2\n hello world", // Metadata: map[string]any{ - // // other fields + // // other fields // "headerNameOfLevel2": "Title 2", // }, - // } + // } Headers map[string]string // TrimHeaders specify if results contain header lines. TrimHeaders bool