Function takes an anchor (and optional link text and formatting style) and transforms the input into a link to an anchor id. Currently works for markdown and wikilink style link transforms.