Convert quotes into smart quotes.

 input - The String to convert.

 Returns the smart-quotified String.
492662
def smartify(input)
      @context.registers[:site].find_converter_instance(
        Jekyll::Converters::SmartyPants
      ).convert(input.to_s)
    end
1145870
def _input_as_multiline_string(self, data):
        
        if data:
            self.Parameters['--in']\
                .on(super(Clearcut,self)._input_as_multiline_string(data))
        return ''
131801
def input_phrases(phrases, options={})
      strings = phrases.map do |string_key, value|
        if value.is_a? Array
          output = []
          value.each_with_index do |string, index|
            output << {:string_key => string_key.to_s, :string => string, :context => index}
          end
          output
        else
          {:string_key => string_key.to_s, :string => value}
        end
      end
      input_strings(strings.flatten(1), options)
    end
1095358
public String prepare(String input) {
		StringBuffer sb = new StringBuffer();
		for (int i = 0; i < input.length(); i++){
		    char c = input.charAt(i);        
		    if(map.get(c) != null) {
		    	replacements++;
		    	sb.append(map.get(c));
		    } else
		    	sb.append(c);
		}
		return sb.toString();
	}
53537
def input(message, until, single_char=False, transform=lambda a: a):
    
    def _getch(message):
        print(message, end='')
        return getch()

    while True:
        text = transform(line_input(message) if not single_char else _getch(message))
        if until(text):
            return text
1213293
public static String toCanonicalForm(CharSequence input) {
      if (input == null) {
         return null;
      }
      return StringFunctions.CANONICAL_NORMALIZATION.apply(input.toString());
   }
59293
def _preprocess_input(self, input):
        '''
        
        '''
        if not re.search(preprocess_chars, input):
            # No characters that we need to preprocess, so continue without.
            return input

        input = self._add_punctuation_spacing(input)

        return input
1014211
def _pad_input(incoming):
    
    incoming_expanded = incoming.replace('{', '{{').replace('}', '}}')
    for key in _BASE_CODES:
        before, after = '{{%s}}' % key, '{%s}' % key
        if before in incoming_expanded:
            incoming_expanded = incoming_expanded.replace(before, after)
    return incoming_expanded
907077
def quoted(text):
    
    if text and " " in text:
        sep = "'" if '"' in text else '"'
        return "%s%s%s" % (sep, text, sep)
    return text
1289832
def load_input(definition):
    
    if isinstance(definition, (str, io.TextIOWrapper)):
        try:
            definition = yaml.safe_load(definition)
        except Exception as exc:
            raise ParsingInputError("Unable to parse input: %s" % str(exc))

    return definition
263116
function smartquotes(context) {
  if (typeof document !== 'undefined' && typeof context === 'undefined') {
    listen.runOnReady(() => element(document.body));
    return smartquotes;
  } else if (typeof context === 'string') {
    return string(context);
  } else {
    return element(context);
  }
}
481135
def smart_str(s, encoding='utf-8', strings_only=False, errors='strict'):
    
    if strings_only and isinstance(s, (types.NoneType, int)):
        return s
    # if isinstance(s, Promise):
    #     return unicode(s).encode(encoding, errors)
    if not isinstance(s, basestring):
        try:
            return str(s)
        except UnicodeEncodeError:
            if isinstance(s, Exception):
                # An Exception subclass containing non-ASCII data that doesn't
                # know how to print itself properly. We shouldn't raise a
                # further exception.
                return ' '.join([smart_str(arg, encoding, strings_only,
                        errors) for arg in s])
            return unicode(s).encode(encoding, errors)
    elif isinstance(s, unicode):
        return s.encode(encoding, errors)
    elif s and encoding != 'utf-8':
        return s.decode('utf-8', errors).encode(encoding, errors)
    else:
        return s
105418
public static String nullifyBadInput(String input)
    {
        if (input != null)
        {
            if (input.matches(emptyRegex))
            {
                return null;
            }
            return input.trim();
        }
        return null;
    }
198445
def preprocess(input)
      input = input.to_s.encode('UTF-8',
        :invalid => :replace,
        :undef   => :replace)

      input.gsub!(/(?:\r\n|[\r\f])/, "\n")
      input.gsub!("\u0000", "\ufffd")
      input
    end
823386
public static String convertToString(InputStream input) throws IOException {
		try {
			if (input == null) {
				throw new IOException("Input Stream Cannot be NULL");
			}
			StringBuilder sb1 = new StringBuilder();
			String line;
			try {
				BufferedReader r1 = new BufferedReader(new InputStreamReader(input, "UTF-8"));
				while ((line = r1.readLine()) != null) {
					sb1.append(line);
				}
			} finally {
				input.close();
			}
			return sb1.toString();
		} catch (IOException e) {
			throw new JKException(e);
		}
	}
1247922
def quote_phrase( str )
      if str.respond_to?(:force_encoding)
        original_encoding = str.encoding
        ascii_str = str.to_s.dup.force_encoding('ASCII-8BIT')
        if Constants::PHRASE_UNSAFE === ascii_str
          dquote(ascii_str).force_encoding(original_encoding)
        else
          str
        end
      else
        Constants::PHRASE_UNSAFE === str ? dquote(str) : str
      end
    end
457545
def quote_value(value):
    
    adapted = adapt(value)
    if hasattr(adapted, 'getquoted'):
        adapted = adapted.getquoted()
    return adapted