Skip to content

Commit

Permalink
feat: adjust coments format
Browse files Browse the repository at this point in the history
  • Loading branch information
BytePender committed Jan 26, 2025
1 parent 69031cd commit 203bc8a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions components/document/transformer/splitter/markdown/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 203bc8a

Please sign in to comment.