diff --git a/custom-skills/32-notion-writer/code/scripts/notion_writer.py b/custom-skills/32-notion-writer/code/scripts/notion_writer.py index d87c4d6..ae63820 100644 --- a/custom-skills/32-notion-writer/code/scripts/notion_writer.py +++ b/custom-skills/32-notion-writer/code/scripts/notion_writer.py @@ -277,7 +277,7 @@ def _parse_lines(lines: List[str]) -> List[Dict[str, Any]]: INLINE_PATTERNS = [ ('code', re.compile(r'`([^`\n]+)`')), - ('mention', re.compile(r'@\[([^\]]+)\]\(([^)\s]+)\)')), + ('mention', re.compile(r'@\[([^\]]+)\]\(([^)\s]+)\)')), # must precede 'link' so @ takes priority ('link', re.compile(r'\[([^\]]+)\]\(([^)\s]+)\)')), ('bold_star', re.compile(r'\*\*([^*\n]+)\*\*')), ('bold_under', re.compile(r'__([^_\n]+)__')), @@ -352,6 +352,7 @@ def parse_rich_text(text: str) -> List[Dict[str, Any]]: mention_title, mention_target = m.group(1), m.group(2) page_id = extract_notion_id(mention_target) if page_id: + # Notion mention API requires dashed UUID; extract_notion_id returns dashless. spans.append({ "type": "mention", "mention": {