code: def directive_fun(match, directive):
      
      directive_to_alert = dict(note="info", warning="danger")
      return ('<div class="alert alert-{0}"><h4>{1}</h4><p>{2}</p></div>'
              .format(directive_to_alert[directive], directive.capitalize(),
                      match.group(1).strip()))
docs: Helper to fill in directives