I have a snippet that is not working. this snippet should convert the file name into pascal case then remove the Impl word after implements
"body": [
"class ${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/g} implements ${${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/g}/(Impl)//} {",
"final ${2:RemoteDataSource} remoteDataSource;",
"${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/g}({required this.remoteDataSource});",
"}"],
Expected Result
class HomeRepositoryImpl implements HomeRepository {
final HomeDataSource remoteDataSource;
HomeRepositoryImpl({required this.remoteDataSource});
}
Actual Result
class HomeRepositoryImpl implements ${HomeRepositoryImpl/(Impl)//} {
final RemoteDataSource remoteDataSource;
HomeRepositoryImpl({required this.remoteDataSource});
}
${${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/g}/(Impl)//}- if you were trying to nest a transform inside another transform here - that cannot be done.