code: def action(elem, doc):
      
      if type(elem) == Str and doc.mhash is not None:
          elem.text = doc.mrenderer.render(elem.text, doc.mhash)
          return elem
docs: Apply combined mustache template to all strings in document.