From 7eb385d0bb1c930fad2da295e60cfdf2cb29f1e9 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sun, 1 May 2022 03:41:37 -0700 Subject: [PATCH] update yaml format to use new message function --- jrnl/plugins/yaml_exporter.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/jrnl/plugins/yaml_exporter.py b/jrnl/plugins/yaml_exporter.py index 0f820207..b22b5743 100644 --- a/jrnl/plugins/yaml_exporter.py +++ b/jrnl/plugins/yaml_exporter.py @@ -12,6 +12,7 @@ from jrnl.exception import JrnlException from jrnl.messages import Message from jrnl.messages import MsgText from jrnl.messages import MsgType +from jrnl.output import print_msg class YAMLExporter(TextExporter): @@ -79,11 +80,12 @@ class YAMLExporter(TextExporter): spacebody = spacebody + "\t" + line if warn_on_heading_level is True: - print( - "{}WARNING{}: Headings increased past H6 on export - {} {}".format( - WARNING_COLOR, RESET_COLOR, date_str, entry.title - ), - file=sys.stderr, + print_msg( + Message( + MsgText.HeadingsPastH6, + MsgType.WARNING, + {"date": date_str, "title": entry.title}, + ) ) dayone_attributes = ""