parameters: (text, is_main_text, branding_replacements_only)
return_statement: return text
docstring: Replaces text string to Brave wording
docstring_summary: Replaces text string to Brave wording
docstring_tokens: Replaces text string to Brave wording
function: def braveify_grd_text(text, is_main_text, branding_replacements_only):
      """Replaces text string to Brave wording"""
      for (pattern, to) in branding_replacements:
          text = re.sub(pattern, to, text)
      if not branding_replacements_only:
          for (pattern, to) in default_replacements:
              text = re.sub(pattern, to, text)
      for (pattern, to) in fixup_replacements:
          text = re.sub(pattern, to, text)
      if is_main_text:
          for (pattern, to) in main_text_only_replacements:
              text = re.sub(pattern, to, text)
      return text
function_tokens: def braveify_grd_text ( text , is_main_text , branding_replacements_only ) : for ( pattern , to ) in branding_replacements : text = re . sub ( pattern , to , text ) if not branding_replacements_only : for ( pattern , to ) in default_replacements : text = re . sub ( pattern , to , text ) for ( pattern , to ) in fixup_replacements : text = re . sub ( pattern , to , text ) if is_main_text : for ( pattern , to ) in main_text_only_replacements : text = re . sub ( pattern , to , text ) return text