improve templated link matching
Merge pull request #10 from pezra/better-var-matching

improve templated link matching