Alex, without the markdown.
337099
function noMarkdown(value, config) {
  var allow

  if (Array.isArray(config)) {
    allow = config
  } else if (config) {
    allow = config.allow
  }

  return core(value, makeText(config).use(filter, {allow: allow}))
}
92220
def no_param_shortcut(parser, token):
    
    bits = smart_split(token.contents)
    tagname = bits.next()
    try:
        imageurl = bits.next()
    except StopIteration:
        raise template.TemplateSyntaxError("%r tag requires at least the image url" % tagname)

    return MogrifyNode(imageurl, [(tagname, ), ])
199989
function replaceHtml(ele, html) {
        var _this = this;

        if (ele.classList.contains('raw-text')) {
            return;
        }
        ele.innerHTML = withEscape( // eslint-disable-line no-undef
        function (html) {
            return function (reg, rep) {
                return _this.htmlSugars.reduce(function (html, _ref) {
                    var _ref2 = _slicedToArray(_ref, 2),
                        regExp = _ref2[0],
                        replace = _ref2[1];

                    return html.replace(regExp, replace);
                }, html).replace(reg, rep);
            };
        })(html);
    }
1097157
private static function _skipFormating()
    {
        return false;

        if(null !== self::$_isAjaxOrCli) {
            return self::$_isAjaxOrCli;
        }

        self::$_isAjaxOrCli =
            (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')
            || (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR']));

        return self::$_isAjaxOrCli;
    }
190850
def xhtml(self, outfn=None, ext='.xhtml', css=None, **params):
        """"""
        from markdown import markdown
        from copy import deepcopy
        from bl.file import File
        from .xslt import XSLT
        from .rng import RNG
        from . import XML, PATH, etree
        rncfn = os.path.splitext(self.fn)[0] + '.rnc'
        rngfn = os.path.splitext(self.fn)[0] + '.rng'
        htmlfn = os.path.splitext(self.fn)[0] + '.html'
        if self.fn==rncfn or os.path.exists(rncfn):
            rngfn = Schema(rncfn).trang(ext='.rng')
        assert os.path.exists(rngfn)

        # convert all <r:define> elements into a <a:definition> blocks containing a compact syntax alternative
        rng = RNG(fn=rngfn)
        for define in rng.xpath(rng.root, "//r:define"):
            log.debug("%s %r" % (rng.tag_name(define), define.attrib))
            tempdefine = deepcopy(define)
            tempgrammar = deepcopy(rng.root); tempgrammar.text = '\n'
            for ch in tempgrammar.getchildren(): rng.remove(ch)
            tempgrammar.insert(0, tempdefine)
            for adoc in rng.xpath(tempdefine, ".//a:documentation | .//a:definition"):
                rng.remove(adoc)
            with tempfile.TemporaryDirectory() as tempdir:
                x = XML(fn=os.path.join(tempdir, 'define.rng'), root=tempgrammar)
                x.write()
                newfn = Schema(x.fn).trang(ext='.rnc')
                txt = open(newfn, 'rb').read().decode('utf-8')
                if '\n\n' in txt:
                    txt = txt[txt.index('\n\n')+1:].strip()
            adef = etree.Element("{%(a)s}definition" % RNG.NS)
            adef.text = txt
            adef.tail = '\n\t\t'
            log.debug(adef.text)
            annotations = rng.xpath(define, "a:*")
            if len(annotations) > 0:
                index = define.index(annotations[-1])+1
            else:
                index = 0
            define.insert(index, adef)
        rng.write()

        xslt = XSLT(fn=os.path.join(PATH, 'xslts', 'rng2md.xslt'))
        md = xslt.saxon9(rng.root, **params).strip()
        html_body = markdown(md, 
            output_format="xhtml5", 
            extensions=[                            # see https://python-markdown.github.io/extensions/
                'markdown.extensions.extra',    
                'markdown.extensions.admonition', 
                'markdown.extensions.headerid', 
                'markdown.extensions.sane_lists', 
                'markdown.extensions.toc']).strip()
        html_text = """<html><head><meta charset="UTF-8"/><style type="text/css">
            body {font-family:sans-serif;line-height:1.3}
            h1,h2,h3 {margin:1em 0 .25em 0}
            h1 {font-size:2rem;font-weight:normal;}
            h2 {font-size:1.2rem;font-weight:bold;}
            h3 {font-size:1.15rem;font-weight:normal;font-style:italic;}
            p {margin:0 0 .5rem 0;}
            p.subtitle {font-size:1.2rem;font-family:sans-serif;margin-bottom:1em}
            p.code {font-family:monospace;font-size:.6rem;color:#666;line-height:1.1}
            pre {font-family:monospace;font-size:.6rem;color:#666;line-height:1.1;margin-left:1.5rem;}
            hr {border:0;border-top:1px solid #999;margin:1rem 0;}
            </style></head><body>\n""" + html_body + """\n</body></html>"""
        html = XML(fn=htmlfn, root=html_text)
        return html
155742
public TypeMetadata without(Entry.Kind kind) {
        if (this == EMPTY || contents.get(kind) == null)
            return this;

        TypeMetadata out = new TypeMetadata(this);
        out.contents.remove(kind);
        return out.contents.isEmpty() ? EMPTY : out;
    }
382142
public function withoutDocComment() : self {
      $this->docCommentChecker = function (Token $token) {
        return $token->isValid() === false;
      };

      return $this;
    }
1037591
def interactive(renderer):
    
    _import_readline()
    _print_heading(renderer)
    contents = []
    more = False
    while True:
        try:
            prompt, more = ('... ', True) if more else ('>>> ', True)
            contents.append(input(prompt) + '\n')
        except EOFError:
            print('\n' + mistletoe.markdown(contents, renderer), end='')
            more = False
            contents = []
        except KeyboardInterrupt:
            print('\nExiting.')
            break
874537
function emojiPlugin (md) {
  md.use(markdownitEmoji, {
    defs: customEmojis,
    shortcuts: shortcuts,
  });

  md.renderer.rules.emoji = function markdownEmojiRules (token, idx) {
    var src;
    var style;
    var emoji = token[idx].markup;

    emoji = parseEmoji(emoji);

    src = 'https://s3.amazonaws.com/habitica-assets/cdn/emoji/' + emoji + '.png';
    style = 'height: 1.5em; width: 1.5em';

    return '<img class="habitica-emoji" style="' + style + '" src="' + src + '" alt="' + emoji + '">';
  };
}
1013916
def render(self, text, auth=None):
        
        if markdown is None:
            import markdown
        if UrlizeExtension is None:
            from .mdx_urlize import UrlizeExtension
        return markdown.markdown(text, extensions=[
            'fenced_code',
            'codehilite(css_class=highlight)',
            'toc',
            'tables',
            'sane_lists',
            UrlizeExtension(),
        ])
1309957
private String skipStyleTag(String text) {
    int start = text.indexOf("<style");  // Leave open as it has attributes.
    int end = text.indexOf("</style>");
    if (start == -1 && end == -1) {
      return spanningStyleTag ? "" : text;
    }
    if (start > -1 && end == -1) {
      spanningStyleTag = true;
      return text.substring(0, start);
    }
    if (start == -1 && end > -1) {
      spanningStyleTag = false;
      return text.substring(end + 8); // "</style>".length
    }
    return text.substring(0, start) + text.substring(end + 8);
  }
113666
def unstyle msg
      styles.map do |_,v|
        v[:match]
      end.flatten.inject(msg) do |m, tag|
        m.gsub(tag, '')
      end
    end
368771
def markdown(text)
      @renderer ||= Redcarpet::Markdown.new(ExternalLinks, no_intra_emphasis: true)
      smartify(@renderer.render(text))
    end
252151
def _clean(self, t, capitalize=None):
        """"""
        if self._from_bibtex:
            t = latex_to_unicode(t, capitalize=capitalize)
        t = ' '.join([el.rstrip('.') if el.count('.') == 1 else el for el in t.split()])
        return t
126308
def strip_html(text):
    
    def reply_to(text):
        replying_to = []
        split_text = text.split()
        for index, token in enumerate(split_text):
            if token.startswith('@'): replying_to.append(token[1:])
            else:
                message = split_text[index:]
                break
        rply_msg = ""
        if len(replying_to) > 0:
            rply_msg = "Replying to "
            for token in replying_to[:-1]: rply_msg += token+","                
            if len(replying_to)>1: rply_msg += 'and '
            rply_msg += replying_to[-1]+". "
        return rply_msg + " ".join(message)
        
    text = reply_to(text)      
    text = text.replace('@', ' ')
    return " ".join([token for token in text.split() 
                     if  ('http:' not in token) and ('https:' not in token)])
1118699
def figure_cleanup(docxml)
      docxml.xpath(FIGURE_WITH_FOOTNOTES).each do |f|
        key = figure_get_or_make_dl(f)
        f.xpath(".//aside").each do |aside|
          figure_aside_process(f, aside, key)
        end
      end
      docxml
    end
642692
def _filter(self, text):
        """"""

        self.markdown.reset()
        return self.markdown.convert(text)