Skip to content

Commit

Permalink
fix: do not quote the divider in highlights (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBernstorff authored Apr 9, 2024
1 parent a9b8b6c commit 2383be3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion memorymarker/question_generator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def chunk_highlights(

for i in range(0, len(group[1]), 5):
subset: Sequence["Highlights"] = group[1][i : i + chunk_size]
combined_text = "\n---".join(
combined_text = "\n---\n".join(
f"> {_.prefix}<HIGHLIGHT>{_.highlighted_text}</HIGHLIGHT>{_.suffix}"
for _ in subset
)
Expand Down
5 changes: 0 additions & 5 deletions memorymarker/question_generator/reasoned_highlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ class SourceDocument:
uri: str


def to_markdown_quote(text: str) -> str:
lines = [f"> {line}" for line in text.splitlines()]
return "\n".join(lines)


class Highlights(BaseModel):
source_document: SourceDocument

Expand Down

0 comments on commit 2383be3

Please sign in to comment.