Skip to content

Commit ca2ad2b

Browse files
authored
Merge pull request #21 from afonsocraposo/fix-title-duplicated
fix: prevent title from being duplicated in the note
2 parents 0398d1a + 224e958 commit ca2ad2b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/mcp_bear/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ async def create(
178178
if title is not None:
179179
params["title"] = title
180180
if text is not None:
181+
if title:
182+
# remove the title from the note text to avoid being duplicated
183+
text = text.removeprefix("# " + title)
181184
params["text"] = text
182185
if tags is not None:
183186
params["tags"] = ",".join(tags)

0 commit comments

Comments
 (0)