interpolationUnescapePattern function

RegExp interpolationUnescapePattern(
  1. I18NextOptions options
)

Implementation

RegExp interpolationUnescapePattern(I18NextOptions options) {
  final prefix = RegExp.escape(options.interpolationPrefix ?? '{{');
  final suffix = RegExp.escape(options.interpolationSuffix ?? '}}');
  final unescapePrefix = RegExp.escape(
    options.interpolationUnescapePrefix ?? '-',
  );
  final unescapeSuffix = RegExp.escape(
    options.interpolationUnescapeSuffix ?? '',
  );
  return RegExp(
    '$prefix$unescapePrefix(.+?)$unescapeSuffix$suffix',
    dotAll: true,
  );
}