Changed template resolve_refs to better handle characters at the edges of references.
Changed template resolve_refs to better handle characters at the edges of references.

cjungmann/schemafw,cjungmann/schemafw,cjungmann/schemafw,cjungmann/schemafw,cjungmann/schemafw