Skip to content

Commit

Permalink
add paragraph_number to body nodes metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Quantisan committed Sep 26, 2023
1 parent 45e20a9 commit d639ce3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mind_palace/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def body(xml, doc_id):
return [
TextNode(
text=line,
metadata={"paragraph_number": index + 1},
id_=f"{doc_id}-body-paragraph-{index}",
)
for index, line in enumerate(xml.body.split("\n"))
Expand Down

0 comments on commit d639ce3

Please sign in to comment.