Skip to content

Commit

Permalink
feat: avoid Q/A prompt hitting memium (#43)
Browse files Browse the repository at this point in the history
- [ ] I have considered whether this PR needs review, and requested a review if necessary.

Fixes issue #

# Notes for reviewers
Reviewers can skip X, but should pay attention to Y.
  • Loading branch information
MartinBernstorff authored Feb 26, 2024
1 parent be08d34 commit 56d1065
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: cf4dfe9
_commit: 981c40d
_src_path: https://github.com/MartinBernstorff/nimble-python-template
email: [email protected]
full_name: Martin Bernstorff
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,7 @@ pr: ## Submit a PR

#########################
# End template makefile #
#########################
#########################

update-snapshots:
@pytest --snapshot-update
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# serializer version: 1
# name: test_single_q_to_markdown
'''
Q. What is the meaning of life?
A. 42
Q) What is the meaning of life?
A) 42

> [!NOTE]- Highlight
> ==42==
Expand Down
4 changes: 2 additions & 2 deletions memorymarker/persist_questions/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def clean_filename(filename: str) -> str:

def q_to_markdown(prompt: "QAPrompt") -> str:
highlight = prompt.hydrated_highlight
return f"""Q. {prompt.question}
A. {prompt.answer}
return f"""Q) {prompt.question}
A) {prompt.answer}
> [!NOTE]- Highlight
> {highlight.prefix or ""}=={highlight.highlighted_text}=={highlight.suffix.strip() if highlight.suffix is not None else ""}
Expand Down

0 comments on commit 56d1065

Please sign in to comment.