 
     :section, {_, num, acc}                   -> {:wait, num, [:section | acc]}
 
+    {:sub, str}, {:meta, num, [h | tl] }      -> { :meta, num, [ map_merge(h, :meta, proc_meta( str )) | tl ] }
     {:sub, str}, {elem, num, [h | tl] }       -> { elem, num, [ append_in(h, elem, str) | tl ] }
+  end
+
+  def proc_meta(str) do
+    [k, v] = String.split(str, "=", parts: 2)
+    |> Enum.map(&String.strip/1)
+    Map.put(%{}, k, v)
   end
 
   # takes a list like [1, 2, 3, :section, 4, 5, 6, :section, 8, 9] and

  end

  mdef concat_blocks_proc do
    :choicerange, {_, num, acc}               -> {:choicerange, num, acc}
    :rows, {_, num, acc}                      -> {:rows, num, acc}
    :choices, {_, num, acc}                   -> {:choices, num, acc}

  end

  def append_in(h, elem, str), do: Map.update(h, elem, [str], fn x -> List.insert_at(x, 999, str) end)
  def map_merge(h, elem, kv), do: Map.update(h, elem, kv, fn x -> Map.merge(x, kv) end)

end
