From 1662568c175938e3b83ba8c29566244862a155f2 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Fri, 9 May 2025 08:21:31 +0200 Subject: [PATCH] fix: add_quotes --- src/rougail/__init__.py | 7 ++++--- tests/test_others.py | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rougail/__init__.py b/src/rougail/__init__.py index c4fda63e0..1ab04f32d 100644 --- a/src/rougail/__init__.py +++ b/src/rougail/__init__.py @@ -61,10 +61,11 @@ def tiramisu_display_name( path = path.replace( "{{ identifier }}", normalize_family(str(subconfig.identifiers[-1])) ) - if with_quote and not path_in_description: - return f'"{path}"{comment}' else: - path = "" + path = comment + comment = "" + if with_quote: + return f'"{path}"{comment}' return f"{path}{comment}" diff --git a/tests/test_others.py b/tests/test_others.py index 84a065744..f411406c3 100644 --- a/tests/test_others.py +++ b/tests/test_others.py @@ -68,6 +68,7 @@ def test_personalize_annotate_twice(): def test_option_params(): rougailconfig = RougailConfig.copy() rougailconfig['dictionaries_dir'] = ['tests/default_option_params/structure'] + rougailconfig["define_default_params"] = True rougailconfig["default_params.unix_filename.test_existence"] = True eolobj = Rougail(rougailconfig=rougailconfig) with raises(ValueError):