<reponame>iai-group/arXivDigest<filename>arxivdigest/core/__init__.py
# -*- coding: utf-8 -*-

import re

from jinja2 import escape
from markupsafe import Markup

__author__ = '<NAME> and <NAME>'
__copyright__ = 'Copyright 2020, The arXivDigest project'


def md_bold(text):
    """Replaces **text** with bold tags."""
    text = str(escape(text))
    text = re.sub('\*\*(.*?)\*\*', r'<b>\1</b>', text)
    return Markup(text)

# -*- coding: utf-8 -*-

import re

from jinja2 import escape
from markupsafe import Markup

__author__ = '<NAME> and <NAME>'
__copyright__ = 'Copyright 2020, The arXivDigest project'


def md_bold(text):
    """Replaces **text** with bold tags."""
    text = str(escape(text))
    text = re.sub('\*\*(.*?)\*\*', r'<b>\1</b>', text)
    return Markup(text)
# -*- coding: utf-8 -*- Replaces **text** with bold tags.