Only link up valid matches for class shortcodes