handle global functions in markup, fixes #138