original_string: public static function escape($string) {
      $escaped_chars = str_split(self::ESCAPED_CHARACTERS);
      $escaped_chars_replace = array_map(function($char) {
        return '\\' . $char;
      }, $escaped_chars);
      $string = str_replace($escaped_chars, $escaped_chars_replace, $string);
      // Ignored whitespace.
      return preg_replace('/\s+/u', ' ', $string);
    }
code: public static function escape($string) {
      $escaped_chars = str_split(self::ESCAPED_CHARACTERS);
      $escaped_chars_replace = array_map(function($char) {
        return '\\' . $char;
      }, $escaped_chars);
      $string = str_replace($escaped_chars, $escaped_chars_replace, $string);
      // Ignored whitespace.
      return preg_replace('/\s+/u', ' ', $string);
    }
code_tokens: public static function escape ( $ string ) { $ escaped_chars = str_split ( self :: ESCAPED_CHARACTERS ) ; $ escaped_chars_replace = array_map ( function ( $ char ) { return '\\' . $ char ; } , $ escaped_chars ) ; $ string = str_replace ( $ escaped_chars , $ escaped_chars_replace , $ string ) ; // Ignored whitespace. return preg_replace ( '/\s+/u' , ' ' , $ string ) ; }
docstring: Escape Markdown special characters.
  
  @param string $string
  A string without any Markdown.
  
  @return mixed
  $string with any special characters escaped.
docstring_tokens: Escape Markdown special characters .