diff options
| author | s-ol <s+removethis@s-ol.nu> | 2022-10-20 14:44:30 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:24:49 +0000 |
| commit | 4522e3257875a5ba8911a1ebbbaa73e99a8010bb (patch) | |
| tree | a20e838348c3ca5274e2bb8380731e659c0d5460 | |
| parent | update flake (diff) | |
| download | alive-4522e3257875a5ba8911a1ebbbaa73e99a8010bb.tar.gz alive-4522e3257875a5ba8911a1ebbbaa73e99a8010bb.zip | |
docs: don't repeat aliased entries
| -rw-r--r-- | alv-lib/logic.moon | 8 | ||||
| -rw-r--r-- | docs/gen/layout.moon | 6 | ||||
| -rwxr-xr-x | docs/gen/module | 3 |
3 files changed, 12 insertions, 5 deletions
diff --git a/alv-lib/logic.moon b/alv-lib/logic.moon index b29c4ba..a0ce49f 100644 --- a/alv-lib/logic.moon +++ b/alv-lib/logic.moon @@ -135,9 +135,9 @@ bool = Constant.meta asc = Constant.meta meta: - name: 'asc?' + name: '<' summary: "Check if values are in ascending order." - examples: { '(asc? a b [c…])', '(< a b [c…])' } + examples: { '(< a b [c…])', '(asc? a b [c…])' } value: class extends CompareOp fn: (a, b) -> a < b @@ -151,9 +151,9 @@ lte = Constant.meta desc = Constant.meta meta: - name: 'desc?' + name: '>' summary: "Check if values are in descending order." - examples: { '(desc? a b [c…])', '(> a b [c…])' } + examples: { '(> a b [c…])', '(desc? a b [c…])' } value: class extends CompareOp fn: (a, b) -> a > b diff --git a/docs/gen/layout.moon b/docs/gen/layout.moon index 4c75749..895baaa 100644 --- a/docs/gen/layout.moon +++ b/docs/gen/layout.moon @@ -20,11 +20,15 @@ render_meta = (meta) -> render = (name, result, prefix=nil, index=false) -> import div, label, code, ul, li, i, a, pre from dom - id = if prefix then "#{prefix}/#{name}" else name + prefix = if prefix then prefix .. "/" else "" + id = prefix .. name typestr = i tostring result.type assert result.meta, "#{id} doesn't have any metadata!" summary = assert result.meta.summary, "#{id} doesn't have a summary!" + if result.meta.name != name + summary = i "alias of ", a (code result.meta.name), href: "##{prefix}#{result.meta.name}" + if index div { label (a (code name), href: "##{id}"), ' (', typestr, '):  – ' diff --git a/docs/gen/module b/docs/gen/module index e6f4e89..d7a8e76 100755 --- a/docs/gen/module +++ b/docs/gen/module @@ -45,5 +45,8 @@ spit OUT, layout li render key, node.result, nil, true h3 'details' ul for key, node in opairs raw.values + if node.result.meta and node.result.meta.name != key + continue + li render key, node.result }, '' |
