
def macros(macro, environ, *args, **kwargs):
    """Return a list of available macros"""

    s = "\n".join(["* %s" % k for k in environ["macros"].keys()])

    return environ["parser"].generate(s, environ=environ)


from inspect import getdoc

def macros(macro, environ, *args, **kwargs):
    """Return a list of available macros"""

    macros = environ["macros"].items()
    s = "\n".join(["== %s ==\n%s\n" % (k, getdoc(v)) for k, v in macros])

    return environ["parser"].generate(s, environ=environ)

Change the output of <<macros>>
examples/web/wiki: Change the output of <<macros>>

+ 
+ from inspect import getdoc
  
  def macros(macro, environ, *args, **kwargs):
      """Return a list of available macros"""
  
-     s = "\n".join(["* %s" % k for k in environ["macros"].keys()])
+     macros = environ["macros"].items()
+     s = "\n".join(["== %s ==\n%s\n" % (k, getdoc(v)) for k, v in macros])
  
      return environ["parser"].generate(s, environ=environ)
  
Change the output of <<macros>>
## Code Before:

def macros(macro, environ, *args, **kwargs):
    """Return a list of available macros"""

    s = "\n".join(["* %s" % k for k in environ["macros"].keys()])

    return environ["parser"].generate(s, environ=environ)

## Instruction:
Change the output of <<macros>>
## Code After:

from inspect import getdoc

def macros(macro, environ, *args, **kwargs):
    """Return a list of available macros"""

    macros = environ["macros"].items()
    s = "\n".join(["== %s ==\n%s\n" % (k, getdoc(v)) for k, v in macros])

    return environ["parser"].generate(s, environ=environ)
