Make italic text (HTML)

    :param content:
    :param sep:
    :return:
332252
def hitalic(*content, sep=' '):
    
    return _md(quote_html(_join(*content, sep=sep)), symbols=MD_SYMBOLS[5])
833954
def markup(str, remove_para = false)
      return '' unless str

      # Convert leading comment markers to spaces, but only if all non-blank
      # lines have them
      if str =~ /^(?>\s*)[^\#]/ then
        content = str
      else
        content = str.gsub(/^\s*(#+)/) { $1.tr '#', ' ' }
      end

      res = formatter.convert content

      if remove_para then
        res.sub!(/^<p>/, '')
        res.sub!(/<\/p>$/, '')
      end

      res
    end
6773
def paragraph(self, content):
        
        if not self._out.description:
            self._out.description = content
        return ' '
1306988
def markup_description(description):
    
    if apply_markdown:
        description = apply_markdown(description)
    else:
        description = escape(description).replace('\n', '<br />')
        description = '<p>' + description + '</p>'
    return mark_safe(description)
774187
def hcode(*content, sep=' '):
    
    return _md(quote_html(_join(*content, sep=sep)), symbols=MD_SYMBOLS[6])
1028396
function prependTitle(html, title, svgWidth) {
        if (!title || !svgWidth) {
            return html;
        }
        let {grey} = colorSchemas;

        html =  html.replace(/<g/,`<text x="${this.margin().left}" y="${config.titleTopOffset}" font-family="${config.titleFontFamily}" font-size="${config.titleFontSize}" fill="${grey[6]}"> ${title} </text><g `);

        return html;
    }
131603
def formatText(self, text):
        
        format = self.inputFormat()
        if format == XLineEdit.InputFormat.Normal:
            return text
        
        text = projex.text.nativestring(text)
        if format == XLineEdit.InputFormat.CamelHump:
            return projex.text.camelHump(text)
        
        elif format == XLineEdit.InputFormat.Pretty:
            return projex.text.pretty(text)
        
        elif format == XLineEdit.InputFormat.Underscore:
            return projex.text.underscore(text)
        
        elif format == XLineEdit.InputFormat.Dash:
            return projex.text.dashed(text)
        
        elif format == XLineEdit.InputFormat.ClassName:
            return projex.text.classname(text)
        
        elif format == XLineEdit.InputFormat.NoSpaces:
            return projex.text.joinWords(text, self.spacer())
        
        elif format == XLineEdit.InputFormat.Capitalize:
            return text.capitalize()
        
        elif format == XLineEdit.InputFormat.Uppercase:
            return text.upper()
        
        elif format == XLineEdit.InputFormat.Lowercase:
            return text.lower()
        
        elif format == XLineEdit.InputFormat.Package:
            return '.'.join(map(lambda x: x.lower(),
                            map(projex.text.classname, text.split('.'))))
        
        return text
314250
def hpre(*content, sep='\n'):
    
    return _md(quote_html(_join(*content, sep=sep)), symbols=MD_SYMBOLS[7])
1124794
def _make_text_block(name, content, content_type=None):
    """"""
    if content_type == 'xhtml':
        return u'<%s type="xhtml"><div xmlns="%s">%s</div></%s>\n' % \
               (name, XHTML_NAMESPACE, content, name)
    if not content_type:
        return u'<%s>%s</%s>\n' % (name, escape(content), name)
    return u'<%s type="%s">%s</%s>\n' % (name, content_type,
                                         escape(content), name)
1353722
function prettify(content, withSpaces = true) {
	const replaceValue = withSpaces ? ' = ' : '=';
	return `${content}\n`.replace(/\s*=\s*/g, replaceValue);
}
1364125
def apply_to_Keyboard(element, content)
		  	plugin, args = CGI.unescapeHTML(content.join("")).split(/\s+/, 2)
			%Q[<%=#{plugin} #{args}%>]
		end
136898
function singleTag(indent, tag, attrs, content) {
    tag = tag.replace(/\$$/,'');
    attrs = getClosedAttr(content, attrs);
    return `${indent}<${tag + attrs}>\n`;
}
611435
function(tag, attribs, contents, selfclosing) {
  var result = '<' + tag;
  if (attribs) {
    var i = 0;
    var attrib;
    while ((attrib = attribs[i]) !== undefined) {
      result = result.concat(' ', attrib[0], '="', attrib[1], '"');
      i++;
    }
  }
  if (contents) {
    result = result.concat('>', contents, '</', tag, '>');
  } else if (selfclosing) {
    result = result + ' />';
  } else {
    result = result.concat('></', tag, '>');
  }
  return result;
}
18239
function highlight(value) {
        var html = ngPrettyJsonFunctions.syntaxHighlight(value) || "";
        html = html
        .replace(/\{/g, "<span class='sep'>{</span>")
        .replace(/\}/g, "<span class='sep'>}</span>")
        .replace(/\[/g, "<span class='sep'>[</span>")
        .replace(/\]/g, "<span class='sep'>]</span>")
        .replace(/\,/g, "<span class='sep'>,</span>");                        
        return isDefined(value) ? scope.tmplElt.find('pre').html(html) : scope.tmplElt.find('pre').empty();
      }
89124
function sanitizeHtml(html){
    var separator = '/';

    if(html.constructor === Object){
        return map(html, function(value){
            var sanitizedHtml = value.split(separator)
                .map(sanitizeHtml)
                .join(separator);
            return sanitizedHtml;
        });
    } else if(html.constructor === Array){
        return html.map(sanitizeHtml);
    }

    var div = document.createElement('div');
    div.appendChild(document.createTextNode(html));
    var sanitizedHtml = div.innerHTML.replace(/&amp;/g, '&');

    if(html != sanitizedHtml){
        return ''; // Blank it
    }

    return sanitizedHtml;
}
27855
def as_text(self):
        '''
        '''
        from leonardo.templatetags.leonardo_tags import _render_content

        request = get_anonymous_request(self)

        content = ''

        try:

            for region in [region.key
                           for region in self._feincms_all_regions]:
                content += ''.join(
                    _render_content(content, request=request, context={})
                    for content in getattr(self.content, region))
        except PermissionDenied:
            pass
        except Exception as e:
            LOG.exception(e)

        return content
1341161
def _clean_html(html):
    
    content = html.replace(u'&#x000A;', u'\n').replace(u'¶', '')
    content = _LINK_PATTERN.sub(u'', content)
    content = _HTML_TAG_PATTERN.sub(u'', content)
    content = _BACKSLASH_PATTERN.sub(u'\n', content)
    return content