Skip to content

Commit a0ad7db

Browse files
authored
Merge pull request #134 from line-o/fix/133
fix: add cardinality to return type
2 parents 82b01dc + e7e7a14 commit a0ad7db

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/main/xar-resources/modules/app.xqm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ function app:print-function-header($function as element(xqdoc:function)) as elem
327327
<span class="hljs-type">{$para/xqdoc:type/string()}</span>,
328328
$para/xqdoc:type/@occurrence/string() || $comma
329329
)
330-
}) <span class="hljs-keyword">as</span>&#160;<span class="hljs-type">{$function/xqdoc:return/xqdoc:type/string()}</span>
330+
}) <span class="hljs-keyword">as</span>&#160;<span class="hljs-type">{$function/xqdoc:return/xqdoc:type/string()}</span>{$function/xqdoc:return/xqdoc:type/@occurrence/string()}
331331
</code></pre>
332332
</header>
333333
};

src/test/cypress/integration/fundoc_spec.cy.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ context('Function Documentation', () => {
6161
})
6262
})
6363

64+
describe('Searching for a specific function, map:keys', () => {
65+
it('should show the correct function signature', () => {
66+
cy.visit('?q=map%3Akeys').get('.signature')
67+
.should('have.text', 'map:keys($map as map(*)) as xs:anyAtomicType*')
68+
})
69+
})
70+
71+
72+
6473
describe('browse', () => {
6574
it('should find local modules', () => {
6675
cy.get('#browse')

0 commit comments

Comments
 (0)