mjkaufer / JSML

:scroll: Dynamic, JSON powered HTML
34 stars 1 forks source link

Better `c`/`children` tag #7

Closed mjkaufer closed 9 years ago

mjkaufer commented 9 years ago

Todo:

Configure the c/children tag to detect if there's an array or not.

This way,

{
    t:"div",
    c:
        {
                t:"p",
                T:"Hello",
        }
}

would be the same as

{
    t:"div",
    c: [
        {
                t:"p",
                T:"Hello",
        }
    ]
}

which would save a bunch of lines. Naturally, it'd only work if there was one children, but it should be an easy implementation. I'll probably do it Tuesday if I have time.

mjkaufer commented 9 years ago

Fixed with commit 77393362f83da5a9bed49fbeca1deeb0235213a0