diff --git a/src/main/xar-resources/modules/app.xqm b/src/main/xar-resources/modules/app.xqm
index 0e754e1..c747824 100644
--- a/src/main/xar-resources/modules/app.xqm
+++ b/src/main/xar-resources/modules/app.xqm
@@ -327,7 +327,7 @@ function app:print-function-header($function as element(xqdoc:function)) as elem
{$para/xqdoc:type/string()},
$para/xqdoc:type/@occurrence/string() || $comma
)
- }) as {$function/xqdoc:return/xqdoc:type/string()}
+ }) as {$function/xqdoc:return/xqdoc:type/string()}{$function/xqdoc:return/xqdoc:type/@occurrence/string()}
};
diff --git a/src/test/cypress/integration/fundoc_spec.cy.js b/src/test/cypress/integration/fundoc_spec.cy.js
index 178c014..6e55eca 100644
--- a/src/test/cypress/integration/fundoc_spec.cy.js
+++ b/src/test/cypress/integration/fundoc_spec.cy.js
@@ -61,6 +61,15 @@ context('Function Documentation', () => {
})
})
+ describe('Searching for a specific function, map:keys', () => {
+ it('should show the correct function signature', () => {
+ cy.visit('?q=map%3Akeys').get('.signature')
+ .should('have.text', 'map:keys($map as map(*)) as xs:anyAtomicType*')
+ })
+ })
+
+
+
describe('browse', () => {
it('should find local modules', () => {
cy.get('#browse')