nestingPattern function

RegExp nestingPattern(
  1. I18NextOptions options
)

Implementation

RegExp nestingPattern(I18NextOptions options) {
  final prefix = RegExp.escape(options.nestingPrefix ?? r'$t(');
  final suffix = RegExp.escape(options.nestingSuffix ?? ')');
  final separator = RegExp.escape(options.nestingSeparator ?? ',');
  return RegExp(
    '$prefix'
    '(?<key>.*?)'
    '($separator\\s*(?<variables>.*?)\\s*)?'
    '$suffix',
  );
}