diff --git a/jrnl/Entry.py b/jrnl/Entry.py index 1306cef5..f32f0985 100755 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -5,7 +5,7 @@ from __future__ import unicode_literals import re import textwrap from datetime import datetime -from .util import split_title +from .util import split_title, bold class Entry: @@ -100,7 +100,7 @@ class Entry: return title else: return "{title}{sep}{body}\n".format( - title=title, + title=bold(title), sep="\n" if has_body else "", body=body if has_body else "", ) diff --git a/jrnl/util.py b/jrnl/util.py index f6a7735f..67142df2 100644 --- a/jrnl/util.py +++ b/jrnl/util.py @@ -178,6 +178,11 @@ def colorize(string): return u"\033[36m{}\033[39m".format(string) +def bold(string): + """Returns the string wrapped in bold ANSI escape""" + return u"\033[1m{}\033[0m".format(string) + + def slugify(string): """Slugifies a string. Based on public domain code from https://github.com/zacharyvoase/slugify