Trim pattern values while compiling template. #184