Make bold text (Markdown)

    :param content:
    :param sep:
    :return:
186657
def bold(*content, sep=' '):
    
    return _md(_join(*content, sep=sep), symbols=MD_SYMBOLS[0])
1181127
def highlight_block(self, text, block):
        
        if self.color_scheme.name != self._pygments_style:
            self._pygments_style = self.color_scheme.name
            self._update_style()
        original_text = text
        if self.editor and self._lexer and self.enabled:
            if block.blockNumber():
                prev_data = self._prev_block.userData()
                if prev_data:
                    if hasattr(prev_data, "syntax_stack"):
                        self._lexer._saved_state_stack = prev_data.syntax_stack
                    elif hasattr(self._lexer, '_saved_state_stack'):
                        del self._lexer._saved_state_stack

            # Lex the text using Pygments
            index = 0
            usd = block.userData()
            if usd is None:
                usd = TextBlockUserData()
                block.setUserData(usd)
            tokens = list(self._lexer.get_tokens(text))
            for token, text in tokens:
                length = len(text)
                fmt = self._get_format(token)
                if token in [Token.Literal.String, Token.Literal.String.Doc,
                             Token.Comment]:
                    fmt.setObjectType(fmt.UserObject)
                self.setFormat(index, length, fmt)
                index += length

            if hasattr(self._lexer, '_saved_state_stack'):
                setattr(usd, "syntax_stack", self._lexer._saved_state_stack)
                # Clean up for the next go-round.
                del self._lexer._saved_state_stack

            # spaces
            text = original_text
            expression = QRegExp(r'\s+')
            index = expression.indexIn(text, 0)
            while index >= 0:
                index = expression.pos(0)
                length = len(expression.cap(0))
                self.setFormat(index, length, self._get_format(Whitespace))
                index = expression.indexIn(text, index + length)

            self._prev_block = block
1195746
def pre(*content, sep='\n'):
    
    return _md(_join(*content, sep=sep), symbols=MD_SYMBOLS[3])
1074731
def formatted_content
      formatted_content = content
      formatted_content.each do |k,v|
        if v.is_a?(String) and v =~ /\n/
          formatted_content[k] = to_markdown(v)
        end
      end
      
      formatted_content
    end
1034729
def _render_content(self, content, **settings):
        
        ocontent = content

        s = self._es_data(settings)
        content = self.fmt_data(content, **s)

        s = self._es_content(settings)
        content = self.fmt_content(content, **s)

        if settings[self.SETTING_TEXT_HIGHLIGHT]:
            s = self._es_text(settings, settings[self.SETTING_TEXT_HIGHLIGHT](ocontent))
        else:
            s = self._es_text(settings, settings[self.SETTING_TEXT_FORMATING])
        content = self.fmt_text(content, **s)

        s = self._es_margin(settings)
        content = self.fmt_margin(content, **s)

        return content
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)
160329
function color(c, bold, msg) {
  return bold ? clic.xterm(c).bold(msg) : clic.xterm(c)(msg);
}
125780
def markdown(text, html=False, valid_tags=GFM_TAGS):
    
    if text is None:
        return None
    if html:
        return Markup(sanitize_html(markdown_convert_html(gfm(text)), valid_tags=valid_tags))
    else:
        return Markup(markdown_convert_text(gfm(text)))
1051286
def markdown(text):
    """"""
    text = gfm(text)
    text = markdown_lib.markdown(text)
    return text
351622
def markdown_to_text(self, source):
        """"""
        if self.comment and self.comment != "#'":
            source = copy(source)
            comment_magic(source, self.language, self.comment_magics)

        return comment_lines(source, self.comment)
85600
def code(*content, sep=' '):
    
    return _md(_join(*content, sep=sep), symbols=MD_SYMBOLS[2])
1105121
def slugify(text, sep='-'):
    """"""
    text = stringify(text)
    if text is None:
        return None
    text = text.replace(sep, WS)
    text = normalize(text, ascii=True)
    if text is None:
        return None
    return text.replace(WS, sep)
332252
def hitalic(*content, sep=' '):
    
    return _md(quote_html(_join(*content, sep=sep)), symbols=MD_SYMBOLS[5])
1042394
def fmt_content(text, width = 0, align = '<', padding = None, padding_left = None, padding_right = None, padding_char = ' '):
        
        if padding_left is None:
            padding_left = padding
        if padding_right is None:
            padding_right = padding
        if padding_left is not None:
            text = '{}{}'.format(str(padding_char)[0] * int(padding_left), text)
        if padding_right is not None:
            text = '{}{}'.format(text, str(padding_char)[0] * int(padding_right))
        if width:
            strptrn = '{:' + ('{}{}{}'.format(str(padding_char)[0], str(TEXT_ALIGNMENT[align]), str(width))) + 's}'
            text = strptrn.format(text)
        return text
1119535
def tidyHTML(dirtyHTML):
    
    try:
        from tidylib import tidy_document
    except ImportError as e:
        raise ImportError(("%s\nYou need to install pytidylib.\n" +
             "e.g. sudo pip install pytidylib") % e)
    options = {
        'output-xhtml':1,
        #add_xml_decl=1,#option in tidy but not pytidylib
        'indent':1,
        'tidy-mark':1,
        #'char-encoding':'utf8',
        'char-encoding':'raw',
    }
    html, errors = tidy_document(dirtyHTML, options=options)
    return html
830804
def bold(text: str) -> str:
    '''
    
    '''
    return (style(text, bold=True, reset=False) +
            style('', bold=False, reset=False))
676363
def highlightBlock(self, text):
        
        self.highlight_block(text)

        # Process blocks for fold detection
        current_block = self.currentBlock()
        previous_block = self._find_prev_non_blank_block(current_block)
        if self.editor:
            if self.fold_detector is not None:
                self.fold_detector._editor = weakref.ref(self.editor)
                self.fold_detector.process_block(
                    current_block, previous_block, text)