Public: Convert the node to a plain text string.

 options - A {Symbol} or {Array of Symbol}s indicating the render options
 width - Column to wrap the output at

 Returns a {String}.
355219
def to_plaintext(options = :DEFAULT, width = 120)
      opts = Config.process_options(options, :render)
      _render_plaintext(opts, width).force_encoding('utf-8')
    end
628533
def to_s
      text = ''

      text << tag_output_string + "\n" unless tags.empty?
      text << "#{@keyword}:#{name_output_string}"
      text << "\n" + description_output_string unless (description.nil? || description.empty?)
      text << "\n" unless (rows.empty? || description.nil? || description.empty?)
      text << "\n" + parameters_output_string if parameter_row
      text << "\n" + rows_output_string unless argument_rows.empty?

      text
    end
117764
function parseOptions (options) {
  return {
    [ELEMENT_TYPE.NORMAL]: (options && options.html && options.html.normal) || 'always',
    [ELEMENT_TYPE.VOID]: (options && options.html && options.html.void) || 'never',
    [ELEMENT_TYPE.COMPONENT]: (options && options.html && options.html.component) || 'always',
    [ELEMENT_TYPE.SVG]: (options && options.svg) || 'always',
    [ELEMENT_TYPE.MATH]: (options && options.math) || 'always'
  }
}
1367675
function nodeText (node) {
  return squashWhitespace(node.textContent)

  function squashWhitespace (string) {
    return string.replace(/\s{2,}/g, ' ').trim()
  }
}
1057279
def render_node(node, context=None, edit=True):
    
    output = node.render(**context or {}) or u''
    if edit:
        return u'<span data-i18n="{0}">{1}</span>'.format(node.uri.clone(scheme=None, ext=None, version=None), output)
    else:
        return output
293946
function (node) {
    var parentTag = node.parentNode && jsxTagName(node.parentNode.tagName);
    if (parentTag === 'textarea' || parentTag === 'style') {
      // Ignore text content of textareas and styles, as it will have already been moved
      // to a "defaultValue" attribute and "dangerouslySetInnerHTML" attribute respectively.
      return;
    }

    var text = escapeSpecialChars(node.textContent);

    if (this._inPreTag) {
      // If this text is contained within a <pre>, we need to ensure the JSX
      // whitespace coalescing rules don't eat the whitespace. This means
      // wrapping newlines and sequences of two or more spaces in variables.
      text = text
        .replace(/\r/g, '')
        .replace(/( {2,}|\n|\t|\{|\})/g, function (whitespace) {
          return '{' + JSON.stringify(whitespace) + '}';
        });
    } else {
      // Handle any curly braces.
      text = text
        .replace(/(\{|\})/g, function (brace) {
          return '{\'' + brace + '\'}';
        });
      // If there's a newline in the text, adjust the indent level
      if (text.indexOf('\n') > -1) {
        text = text.replace(/\n\s*/g, this._getIndentedNewline());
      }
    }
    this.output += text;
  }
170193
function serializeText (node, opts) {
  return encode(node.nodeValue, extend({
    named: true,
    special: { '<': true, '>': true, '&': true }
  }, opts));
}
1069012
function nodeToString(node) {
    switch (node.type) {
        case ("BinaryExpression"): {
            return nodeToString(node.left) + node.operator.toString() + nodeToString(node.right);
        }
        case ("CallExpression"): {
            var args = node.arguments.map(function(arg) {
                return nodeToString(arg);
            }).toString();
            return nodeToString(node.callee) + "(" + args + ")";
        }
        case ("ConditionalExpression"): {
            return nodeToString(node.test) + "?" + nodeToString(node.consequent) + ":" + nodeToString(node.alternate);
        }
        case ("Identifier"): {
            return node.name.toString();
        }
        case ("Literal"): {
            return node.value.toString();
        }
        case ("MemberExpression"): {
            return nodeToString(node.object) + "[" + nodeToString(node.property) + "]";
        }
        case ("TemplateElement"): {
            return node.value.raw.toString();
        }
        case ("TemplateLiteral"): {
            // interleave quasis with expressions
            var s = [];
            node.quasis.forEach(function(quasi, i) {
                if (quasi.value.raw) {
                    s.push(nodeToString(quasi));
                }
                var expression = node.expressions[i];
                if (expression) {
                    s.push(nodeToString(expression));
                }
            });
            return s.join("");
        }
        default: {
            // Silently ignore Nodes with types we don't handle
            return "";
        }
    }
}
651197
def render_open_tag options
      out = '<' + tag_name
      unless attributes.empty?
        attributes.each do |name,value|
          name = name.to_s.gsub('_', '-') if name.is_a? Symbol
          value = value.to_s.gsub('_', '-') if value.is_a? Symbol

          case value
          when false
            next
          when true
            if options[:format] == Rxhp::XHTML_FORMAT
              out += ' ' + name + '="' + name + '"'
            else
              out += ' ' + name
            end
          else
            out += ' ' + name.to_s + '="' + html_escape(value.to_s) + '"'
          end
        end
      end

      if options[:format] == Rxhp::XHTML_FORMAT && !children?
        out + ' />'
      else
        out + '>'
      end
    end
180262
function formatText(text, options) {
  var finalText = text;

  if (options && options.trimmed && text.length > 25)
    finalText = finalText.substring(0,25).trim() + "…";
  if (!(options && options.preserveWhitespace))
    finalText = finalText.trim();

  return finalText;
}
893875
public static String nodeToString(final Node node) {
        try {
            final Transformer t = TransformerFactory.newInstance().newTransformer();
            t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
            final StringWriter sw = new StringWriter();
            t.transform(new DOMSource(node), new StreamResult(sw));
            return sw.toString();
        } catch (final TransformerException ex) {
            throw new RuntimeException("Failed to render node", ex);
        }
    }
280108
def to_xml_string(str = '')
      valid = RichTextRun::INLINE_STYLES
      data = Hash[self.instance_values.map{ |k, v| [k.to_sym, v] }]
      data = data.select { |key, value| valid.include?(key) && !value.nil? }

      str << '<r><rPr>'
      data.keys.each do |key|
        case key
        when :font_name
          str << ('<rFont val="' << font_name << '"/>')
        when :color
          str << data[key].to_xml_string
        else
          str << ('<' << key.to_s << ' val="' << xml_value(data[key]) << '"/>')
        end
      end
      clean_value = Axlsx::trust_input ? @value.to_s : ::CGI.escapeHTML(Axlsx::sanitize(@value.to_s))
      str << ('</rPr><t>' << clean_value << '</t></r>')
    end
554538
function(json, options) {
	var indent = options.asText == 'pretty' ? '\t' : null;
	if (options.javascript) {
		return util.js.stringify(json, indent);
	}
	else {
		return JSON.stringify(json, null, indent);
	}
}
532581
public int printOptions(Options options) {
        Collection<Option> optList = options.getAllOptions();
        StringBuilder sb = new StringBuilder();
        int leftWidth = 0;
        if (!options.isEmpty()) {
            leftWidth = renderOptions(sb, optList);
            if (sb.length() > 0) {
                if (StringUtils.hasLength(options.getTitle())) {
                    console.writeLine(options.getTitle());
                }
                console.writeLine(sb.toString());
            }
        }
        return leftWidth;
    }
619115
def to_string(line_prefix = "", indent = "\t")
      line_prefix = "" if line_prefix.nil?
      s = ""
      s << line_prefix
      
      if name == "content" && namespace.empty?
        skip_value_space = true
      else
        skip_value_space = false
        s << "#{namespace}:" unless namespace.empty?
        s << name
      end

      # output values
      values do |value|
        if skip_value_space
          skip_value_space = false
        else
          s << " "
        end
        s << SDL4R.format(value, true, line_prefix, indent)
      end

      # output attributes
      unless @attributesByNamespace.empty?
        all_attributes_hash = attributes
        all_attributes_array = all_attributes_hash.sort { |a, b|
          namespace1, name1 = a[0].split(':')
          namespace1, name1 = "", namespace1 if name1.nil?
          namespace2, name2 = b[0].split(':')
          namespace2, name2 = "", namespace2 if name2.nil?

          diff = namespace1 <=> namespace2
          diff == 0 ? name1 <=> name2 : diff
        }
        all_attributes_array.each do |attribute_name, attribute_value|
          s << " " << attribute_name << '=' << SDL4R.format(attribute_value, true)
        end
      end

      # output children
      unless @children.empty?
        s << " {#{$/}"
        children_to_string(line_prefix + indent, s)
        s << line_prefix << ?}
      end

      return s
    end
883317
def htmlprint(*values, plain=None, **options):
    
    print(*[htmlrender(x, plain=plain) for x in values], **options)
535818
def _format_line(self, side, flag, linenum, text):
        
        try:
            linenum = '%d' % linenum
            id = ' id="%s%s"' % (self._prefix[side], linenum)
        except TypeError:
            # handle blank lines where linenum is '>' or ''
            id = ''
        # replace those things that would get confused with HTML symbols
        text = text.replace("&", "&amp;"). \
            replace(">", "&gt;"). \
            replace("<", "&lt;")

        # make space non-breakable so they don't get compressed or line wrapped
        text = text.replace(' ', '&nbsp;').rstrip()

        color = ''
        if '\0^' in text or '\0+' in text or '\0-' in text:
            color = ';background-color:{0}'
            if side == 0:
                color = color.format('#ffe6e6')
            else:
                color = color.format('#e3ffe3')
        return self.TD_DIFF_HEADER.format(id, linenum, color, text)