Abstract text, marked up with HTML (`str`).
543801
def abstract_html(self):
        """"""
        descriptions = _pluralize(self._r['descriptions'], 'description')
        for desc in descriptions:
            if desc['@descriptionType'] == 'Abstract':
                return desc['#text']
1293782
def textFromHTML(html):
    
    cleaner = lxml.html.clean.Cleaner(scripts=True)
    cleaned = cleaner.clean_html(html)
    return lxml.html.fromstring(cleaned).text_content()
496665
def with_text(self, text, markdown=None):
        '''
        '''
        self._text = text
        self._markdown = markdown or False

        return self
215371
function htmlString(target, tag, attributes, linebreak) {
		var wrap = getHTMLWrap((tag || 'span'), (attributes || {style: 'white-space:pre;font-family:monospace;'}), linebreak);
		var mw = core.base();
		mw.enabled = true;
		mw.target = target;
		mw.writeln = function (line) {
			if (mw.enabled) {
				mw.target.writeln(wrap(line));
			}
		};
		mw.toString = function () {
			return '<miniwrite-html-string>';
		};
		return mw;
	}
1205365
function htmlToText(html) {
    var pos = html.indexOf('&');
    if (pos < 0) { return html; }
    // Handle numeric entities specially.  We can't use functional substitution
    // since that doesn't work in older versions of Safari.
    // These should be rare since most browsers convert them to normal chars.
    for (--pos; (pos = html.indexOf('&#', pos + 1)) >= 0;) {
      var end = html.indexOf(';', pos);
      if (end >= 0) {
        var num = html.substring(pos + 3, end);
        var radix = 10;
        if (num && num.charAt(0) === 'x') {
          num = num.substring(1);
          radix = 16;
        }
        var codePoint = parseInt(num, radix);
        if (!isNaN(codePoint)) {
          html = (html.substring(0, pos) + String.fromCharCode(codePoint) +
                  html.substring(end + 1));
        }
      }
    }

    return html.replace(pr_ltEnt, '<')
        .replace(pr_gtEnt, '>')
        .replace(pr_aposEnt, "'")
        .replace(pr_quotEnt, '"')
        .replace(pr_nbspEnt, ' ')
        .replace(pr_ampEnt, '&');
  }
323479
def p_text(self, text):
        ''''''
        item = text[1]
        text[0] = item if item[0] != "\n" else u""
        if len(text) > 2:
            text[0] += "\n"
1064853
def abstract_json(soup):
    """"""
    abstract_tags = raw_parser.abstract(soup)
    abstract_json = None
    for tag in abstract_tags:
        if tag.get("abstract-type") is None:
            abstract_json = render_abstract_json(tag)
    return abstract_json
645607
def pretty_string(s, embedded, current_line, uni_lit=False,
                  min_trip_str=20, max_line=100):
    

    default = repr(s)

    # Punt on abnormal strings
    if (isinstance(s, special_unicode) or not isinstance(s, basestring)):
        return default
    if uni_lit and isinstance(s, bytes):
        return 'b' + default

    len_s = len(default)

    if current_line.strip():
        len_current = len(current_line)
        second_line_start = s.find('\n') + 1
        if embedded > 1 and not second_line_start:
            return default

        if len_s < min_trip_str:
            return default

        line_indent = len_current - len(current_line.lstrip())

        # Could be on a line by itself...
        if embedded and not second_line_start:
            return default

        total_len = len_current + len_s
        if total_len < max_line and not _properly_indented(s, line_indent):
            return default

    fancy = string_triplequote_repr(s)

    # Sometimes this doesn't work.  One reason is that
    # the AST has no understanding of whether \r\n was
    # entered that way in the string or was a cr/lf in the
    # file.  So we punt just so we can round-trip properly.

    try:
        if eval(fancy) == s and '\r' not in fancy:
            return fancy
    except:
        pass
    return default
1015670
function (str) {
            return str.replace(getUnEscapeReg(), function (m, n) {
                return htmlEntities[m] || String.fromCharCode(+n);
            });
        }
842273
def selection_text=(str)
      from = [@text_input.selection_start, @text_input.caret_pos].min
      to = [@text_input.selection_start, @text_input.caret_pos].max
      new_length = str.length

      full_text = text
      tags_length_before = (0...from).inject(0) {|m, i| m + @tags[i].length }
      tags_length_inside = (from...to).inject(0) {|m, i| m + @tags[i].length }
      range = (selection_range.first + tags_length_before)...(selection_range.last + tags_length_before + tags_length_inside)
      full_text[range] = str.encode('UTF-8', undef: :replace)
      @text_input.text = full_text

      @text_input.selection_start = @text_input.caret_pos = from + new_length

      recalc # This may roll back the text if it is too long!

      publish :changed, self.text

      str
    end
53517
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 (steps.empty? || description.nil? || description.empty?)
      text << "\n" + steps_output_string unless steps.empty?
      text << "\n\n" + examples_output_string unless examples.empty?

      text
    end
1165029
function(elem, currentText) {

            var self = this;

            if(self.options["html"]) {

                elem.html(currentText);

            }

            else {

                elem.text(currentText);

            }

            return self;

        }
519977
function (str) {
    var lit = this.ast_stringify(t.stringLiteral(str));
    var ast = this.ast_buffer(lit);
    return ast;
  }
170777
def html(content, **kwargs):
    """"""
    if hasattr(content, 'read'):
        return content
    elif hasattr(content, 'render'):
        return content.render().encode('utf8')

    return str(content).encode('utf8')
1006958
def mod_abstract(text)
#      return text
      abstract,section = [],[]
      content = ""
      text.split("\n").each do |line|
        case line
        when /^\\section(.+)/
          section.push $1
        end
#        p section[-1]
        case section[-1]
        when /\{abstract\}/, /\{【abstract】\}/
          abstract << line+"\n"
        when /\{概要\}/, /\{【概要】\}/
          abstract << line+"\n"
        else
          content << line+"\n"
        end
      end
#      p abstract
      if abstract.size>1 then
        abstract.delete_at(0)
        content.gsub!(/\\tableofcontents/){|text|
          tt="\n\\abstract\{\n#{abstract.join}\}\n\\tableofcontents"
        }
      end
      return content
    end
880690
def _repr_html_(self):
        
        # Use StringIO to avoid a large number of memory allocations with string concat
        with io.StringIO() as out:
            out.write('<{tag}'.format(tag=escape(self.tag_name)))
            if self.style:
                # Important values are in double quotes - cgi.escape only escapes double quotes, not single quotes!
                out.write(' style="{css}"'.format(
                    css=escape(self._to_inline_css(self.style))))

            for k, v in self.attributes.items():
                k2 = k
                if k2 == 'class_':
                    k2 = 'class'
                # Important values are in double quotes - cgi.escape only escapes double quotes, not single quotes!
                if isinstance(v, string_types):
                    out.write(' {key}="{value}"'.format(
                        key=escape(k2), value=escape(v)))
                if isinstance(v, bool) and v:
                    out.write(' {key}'.format(key=escape(k2)))
            out.write('>')

            for c in self.children:
                if isinstance(c, string_types):
                    out.write(escape(safe_unicode(c)))
                else:
                    out.write(c._repr_html_())

            out.write('</{tag}>'.format(tag=escape(self.tag_name)))

            return out.getvalue()
940221
def to_html(self):
        
        if self.text is None:
            return
        else:
            return '<p%s>%s%s</p>' % (
                self.html_attributes(), self.html_icon(), self.text.to_html())