mirror of
https://github.com/TECHNOFAB11/docsonnet.git
synced 2025-12-12 06:20:12 +01:00
feat: add enums to args (#45)
This commit is contained in:
parent
5e45c19fbe
commit
cf4ff4b950
3 changed files with 61 additions and 8 deletions
|
|
@ -203,9 +203,31 @@
|
|||
for arg in self.doc.args
|
||||
]),
|
||||
|
||||
enums: std.join('', [
|
||||
if arg.enums != null
|
||||
then '\n\nAccepted values for `%s` are ' % arg.name
|
||||
+ (
|
||||
std.join(', ', [
|
||||
std.toString(item)
|
||||
for item in arg.enums
|
||||
])
|
||||
)
|
||||
else ''
|
||||
for arg in self.doc.args
|
||||
]),
|
||||
|
||||
linkName: '%(name)s(%(args)s)' % self,
|
||||
|
||||
content: '```ts\n%(name)s(%(args)s)\n```\n\n%(help)s' % self,
|
||||
content:
|
||||
(|||
|
||||
```ts
|
||||
%(name)s(%(args)s)
|
||||
```
|
||||
|
||||
||| % self)
|
||||
+ '%(help)s' % self
|
||||
+ '%(enums)s' % self,
|
||||
// odd concatenation to prevent unintential newline changes
|
||||
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue