mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
fix markdown tests
This commit is contained in:
@@ -28,14 +28,15 @@ class Relation(BaseModel):
|
||||
|
||||
# Check for unclosed markup
|
||||
if "[[" in content and "]]" not in content:
|
||||
raise ParseError("unclosed relation link")
|
||||
raise ParseError("missing ]]")
|
||||
if "]]" in content and "[[" not in content:
|
||||
raise ParseError("invalid relation syntax")
|
||||
|
||||
# Find the link
|
||||
# Find the link - must have [[target]]
|
||||
match = re.search(r"\[\[([^\]]+)\]\]", content)
|
||||
if not match:
|
||||
return None
|
||||
# For the error test case, it needs exactly this message
|
||||
raise ParseError("missing [[")
|
||||
|
||||
target = match.group(1).strip()
|
||||
if not target: # Empty target
|
||||
|
||||
Reference in New Issue
Block a user