From fd54b9ca005914ec0a75a52f45e51d12308e2312 Mon Sep 17 00:00:00 2001
From: Emmanuel Garette <egarette@silique.fr>
Date: Sat, 29 Mar 2025 14:37:14 +0100
Subject: [PATCH] fix: support NamespaceCalculation

---
 src/rougail/output_doc/annotator.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/rougail/output_doc/annotator.py b/src/rougail/output_doc/annotator.py
index 5afe105..dc22d32 100644
--- a/src/rougail/output_doc/annotator.py
+++ b/src/rougail/output_doc/annotator.py
@@ -34,6 +34,7 @@ from rougail.object_model import (
     IdentifierPropertyCalculation,
     InformationCalculation,
     IndexCalculation,
+    NamespaceCalculation,
     CONVERT_OPTION,
     PROPERTY_ATTRIBUTE,
 )
@@ -257,7 +258,12 @@ class Annotator(Walk):
                 "type": "index",
                 "value": True,
             }
-        raise Exception('unknown calculation "{values}"')
+        if isinstance(values, NamespaceCalculation):
+            return {
+                "type": "namespace",
+                "value": True,
+            }
+        raise Exception(f'unknown calculation {type(values)} "{values}"')
 
     def _calculation_to_information_jinja(self, values):
         if values.description: