Converts the input to the body of a CSS string literal.
421336
public static LoggingAdvisingAppendable escapeCssStringStreaming(
      LoggingAdvisingAppendable delegate) {
    return StreamingEscaper.create(delegate, EscapingConventions.EscapeCssString.INSTANCE);
  }
917678
def cssText(self) -> str:
        """"""
        _style = self.style.cssText
        if _style:
            return '{0} {{{1}}}'.format(self.selectorText, _style)
        return ''
183012
function( input ) {

    var self = this

    return input.replace(
      /[=][?]([^?]+)[?]([a-z])[?]([^?]*)[?][=]/gi,
      function( match, charset, type, data ) {

        type = type.toUpperCase()

        return type === 'B' ?
          self.decodeBase64( data, charset ) :
          self.decodeQP( data, charset, true )

      }
    )

  }
188142
function applyStyle(str, property, value) {
    var styleDefinition = CONSOLE_STYLES[property][value];

    //No style defined return non modified string
    if (styleDefinition === null) {
        return str;
    }

    return ESCAPE + '[' + styleDefinition[0] + 'm' + str + ESCAPE + '[' + styleDefinition[1] + 'm';
}
435892
def css_to_func(css, flags, css_namespaces, lang):
    """"""
    from cssselect import parse, HTMLTranslator
    from cssselect.parser import FunctionalPseudoElement
    #  FIXME HACK need lessc to support functional-pseudo-selectors instead
    #  of marking as strings and stripping " here.
    if not (css):
        return None

    sel = parse(css.strip('" '))[0]
    xpath = HTMLTranslator().selector_to_xpath(sel)

    first_letter = False
    if sel.pseudo_element is not None:
        if type(sel.pseudo_element) == FunctionalPseudoElement:
            if sel.pseudo_element.name in ('attr', 'first-letter'):
                xpath += '/@' + sel.pseudo_element.arguments[0].value
                if sel.pseudo_element.name == 'first-letter':
                    first_letter = True
        elif isinstance(sel.pseudo_element, type(u'')):
            if sel.pseudo_element == 'first-letter':
                first_letter = True

    xp = etree.XPath(xpath, namespaces=css_namespaces)

    def toupper(u):
        """Use icu library for locale sensitive uppercasing (python2)."""
        loc = Locale(lang) if lang else Locale()
        return UnicodeString(u).toUpper(loc).encode('utf-8').decode('utf-8')

    def func(elem):
        res = xp(elem)
        if res:
            if etree.iselement(res[0]):
                res_str = etree.tostring(res[0], encoding='unicode',
                                         method="text")
            else:
                res_str = res[0]
            if first_letter:
                if res_str:
                    if flags and 'nocase' in flags:
                        return toupper(res_str[0])
                    else:
                        return res_str[0]
                else:
                    return res_str
            else:
                if flags and 'nocase' in flags:
                    return toupper(res_str)
                else:
                    return res_str

    return func
756014
function ( target ) {
        var result = {},
            val = String( target );

        if ( val && val.indexOf('(') > -1 ) {
            result = {value: $B.string.trim(val), unit: ''};
        } else {
            val.replace( this.REG_CSS_VALUE, function (str, v, u) {
                result = {value: $B.string.trim(v), unit: u || ''};
            });
        }
        return result;
    }
1252904
function(input) {
		var result = {};
		if ('selectionStart' in input) {
			result.start = input.selectionStart;
			result.length = input.selectionEnd - result.start;
		} else if (document.selection) {
			input.focus();
			var sel = document.selection.createRange();
			var selLen = document.selection.createRange().text.length;
			sel.moveStart('character', -input.value.length);
			result.start = sel.text.length - selLen;
			result.length = selLen;
		}
		return result;
	}
1006573
def selector_to_str(value)
      return value.value if value.is_a?(Sass::Script::String)
      return unless value.is_a?(Sass::Script::List)

      if value.separator == :comma
        return value.to_a.map do |complex|
          next complex.value if complex.is_a?(Sass::Script::String)
          return unless complex.is_a?(Sass::Script::List) && complex.separator == :space
          return unless (str = selector_to_str(complex))
          str
        end.join(', ')
      end

      value.to_a.map do |compound|
        return unless compound.is_a?(Sass::Script::String)
        compound.value
      end.join(' ')
    end
199338
String stringValue( CssFormatter formatter ) {
        String str;
        try {
            formatter.addOutput();
            appendTo( formatter );
        } catch( Exception ex ) {
            throw createException( ex );
        } finally {
            str = formatter.releaseOutput();
        }
        return str;
    }
1096306
def textilize(input)
      site = @context.registers[:site]
      converter = if site.respond_to?(:find_converter_instance)
        site.find_converter_instance(Jekyll::Converters::Textile)
      else
        site.getConverterImpl(Jekyll::Converters::Textile)
      end
      converter.convert(input)
    end
853711
function parseSLComment(css) {
    var start = pos;

    // Read the string until we meet line break.
    // Since we already know first 2 characters (`//`), start reading
    // from `pos + 2`:
    for (pos += 2; pos < css.length; pos++) {
      if (css.charAt(pos) === '\n' || css.charAt(pos) === '\r') {
        break;
      }
    }

    // Add comment (including `//` and line break) to the list of tokens:
    pushToken(TokenType.CommentSL, css.substring(start, pos--), col);
    col += pos - start;
  }
508640
function (attrString) {
    var tokens = {};

    // Regex for parsing a css attribute declaration, taken from css-parse:
    // https://github.com/reworkcss/css-parse/blob/7cef3658d0bba872cde05a85339034b187cb3397/index.js#L219
    var regex = /(\*?[-#\/\*\\\w]+(?:\[[0-9a-z_-]+\])?)\s*:\s*(?:\'(?:\\\'|.)*?\'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+[;\s]*/g;
    var match = regex.exec(attrString);
    while (match) {
      // match[0] = entire matching string
      // match[1] = css property
      // Prefix the token to prevent conflicts with existing properties.

      // XXX No `String.trim` on Safari 4. Swap out $.trim if we want to
      // remove strong dep on jquery.
      tokens[' ' + match[1]] = match[0].trim ?
        match[0].trim() : $.trim(match[0]);

      match = regex.exec(attrString);
    }

    return tokens;
  }
1206569
function(input) {
    return input.replace(/\{{2,}/g, function(match) {
      return match.length > 2 ? match.substr(2) : '<%=';
    }).replace(/\}{2,}/g, function(match) {
      return match.length > 2 ? match.substr(2) : '%>';
    });
  }
332363
function Converter(css) {
  var parse = require('css-parse');
  this.css = css;
  this.root = parse(css, { position: false });
  this.indents = 0;
}
1031223
function match(re) {
    var m = re.exec(css);
    if (!m) return;
    var str = m[0];
    updatePosition(str);
    css = css.slice(str.length);
    return m;
  }
102236
function stringular(input) {
  var args = Array.prototype.slice.call(arguments, 1);

  return input.replace(/{(\d+)}/g, function (match, number) {
    return isUndefined(args[number]) ? match : args[number];
  });

}
993169
public static CssSel sel(String selector, String value) {
	return j.sel(selector, value);
    }