diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-05-08 10:23:17 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:23:21 +0000 |
| commit | 223a98aab9b33a86e56915244aac42e17a9535af (patch) | |
| tree | bb12f4d79a7e3dbf29b1dd116f582f9844820c92 /docs | |
| parent | add alv.type and spec (diff) | |
| download | alive-223a98aab9b33a86e56915244aac42e17a9535af.tar.gz alive-223a98aab9b33a86e56915244aac42e17a9535af.zip | |
fix docs
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/gen/dom.moon | 22 | ||||
| -rwxr-xr-x | docs/gen/index | 2 | ||||
| -rw-r--r-- | docs/gen/layout.moon | 1 | ||||
| -rwxr-xr-x | docs/gen/module | 1 |
4 files changed, 4 insertions, 22 deletions
diff --git a/docs/gen/dom.moon b/docs/gen/dom.moon index 7541fbd..51038c5 100644 --- a/docs/gen/dom.moon +++ b/docs/gen/dom.moon @@ -1,26 +1,6 @@ -- mmm.dom -- see https://mmm.s-ol.nu/meta/mmm.dom/ - -export opairs - --- ordered table iterator, for stable(r) renderers -sort = (t, order_fn, only_strings) -> - with index = [k for k,v in pairs t when (not only_strings) or 'string' == type k] - table.sort index, order_fn - --- ordered next(t) -onext = (state, key) -> - state.i += state.step - { :t, :index, :i } = state - - if key = index[i] - key, t[key] - --- ordered pairs(t). --- order_fn is optional; see table.sort -opairs = (t, order_fn, only_strings=false) -> - state = { :t, i: 0, step: 1, index: sort t, order_fn, only_strings } - onext, state, nil +import opairs from require 'alv.util' void_tags = { 'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', 'track', 'wbr' } void_tags = { t,t for t in *void_tags } diff --git a/docs/gen/index b/docs/gen/index index 96f85f0..a2fe486 100755 --- a/docs/gen/index +++ b/docs/gen/index @@ -1,7 +1,7 @@ #!/usr/bin/env moon -import ValueStream from require 'alv' import render, layout, autoref from require 'docs.gen.layout' import section, h1, h2, p, ul, li, a, code from require 'docs.gen.dom' +import opairs from require 'alv.util' export OUT diff --git a/docs/gen/layout.moon b/docs/gen/layout.moon index 084807e..ee0f359 100644 --- a/docs/gen/layout.moon +++ b/docs/gen/layout.moon @@ -1,6 +1,7 @@ version = require 'alv.version' dom = require 'docs.gen.dom' import compile from require 'discount' +import opairs from require 'alv.util' render_meta = (meta) -> import p, code from dom diff --git a/docs/gen/module b/docs/gen/module index 143e3fe..4d8c18d 100755 --- a/docs/gen/module +++ b/docs/gen/module @@ -2,6 +2,7 @@ import Scope from require 'alv' import render, layout from require 'docs.gen.layout' import section, h2, h3, ul, li, code from require 'docs.gen.dom' +import opairs from require 'alv.util' export OUT, require |
