informalsystems / themis-tracer

A tool for managing complex contexts for developing critical systems
Apache License 2.0
4 stars 0 forks source link

Support nested definition lists #56

Open shonfeder opened 3 years ago

shonfeder commented 3 years ago

Pandoc support nested definition lists. This can provide a more compact notation for logical unit trees.

Pandoc parses

|PARENT.1|
: Parent defs
: |CHILD.1|
    : Child def
    : |GRAND-CHILD.1|
        : Grandchild defs

as

DefinitionList
 [([Str "|PARENT.1|"],
   [[Plain [Str "Parent",Space,Str "defs"]]
   ,[DefinitionList
     [([Str "|CHILD.1|"],
       [[Plain [Str "Child",Space,Str "def"]]
       ,[DefinitionList
         [([Str "|GRAND-CHILD.1|"],
           [[Plain [Str "Grandchild",Space,Str "defs"]]])]]])]]])]]

In our support for this, we would interpret this nested representation as equivalent to

|PARENT.1|
: Parent defs

|PARENT.1::CHILD.1|
: Child def

|PARENT.1::CHILD.1::GRAND-CHILD.1|
: Grandchild defs