add string util function to find matching bracket
support nested brackets and spaces in links

- behavior matches sundown
typo