Files
Keep/keep-notes/fix_hook_lang.py
2026-04-17 21:14:43 +02:00

12 lines
474 B
Python

with open('hooks/use-auto-tagging.ts', 'r') as f:
content = f.read()
# Make sure we add `const { language } = useLanguage();`
content = content.replace(
'export function useAutoTagging({ content, notebookId, enabled = true }: UseAutoTaggingProps) {',
'export function useAutoTagging({ content, notebookId, enabled = true }: UseAutoTaggingProps) {\n const { language } = useLanguage();'
)
with open('hooks/use-auto-tagging.ts', 'w') as f:
f.write(content)