mbakeranalecta / sam

Semantic Authoring Markdown
Other
79 stars 8 forks source link

Allowing children of an insert #120

Closed mbakeranalecta closed 7 years ago

mbakeranalecta commented 7 years ago

An insert instruction can have children. This is to allow you to override string values in a fragment insert:

            >>>(~foobar)
                $a=apricot
                $b=breadfruit

But there is currently no restriction on what you can nest under an insert, and it is not clear what the semantics are of inserting anything other than string definitions for a fragment insert.

Should it be illegal at the syntax level to do anything else?

Alternatively, it could be left to the schema to rule it out.

mbakeranalecta commented 7 years ago

Is there any reason why overriding stings should apply only to fragments? Why not to things reused by id or name just the same?

mbakeranalecta commented 7 years ago

Given the general principle of not imposing restrictions in syntax that can be impose in schema, the answer should be to allow an insert to have any children you like -- and it is your responsibility to figure out what the semantics of that are if you allow it in your schema.