Added support for configurable snippet extension;
Fixed handling of escaping in substitutions