From 716ce0fe3a6bdaa1ab3148e434b4a7788aa36102 Mon Sep 17 00:00:00 2001 From: Mark Liffiton Date: Mon, 16 Dec 2024 01:00:39 -0600 Subject: [PATCH] Tweak presentation of errors. --- src/language/helper.py | 2 +- src/language/templates/help_view.html | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/language/helper.py b/src/language/helper.py index ffec6a5..071512b 100644 --- a/src/language/helper.py +++ b/src/language/helper.py @@ -79,7 +79,7 @@ def insert_corrections_html(original: str, errors: list[ErrorSet]) -> str: def replacement(match: re.Match[str]) -> str: matched_text = match.group(0) - error_types = "".join(f'{item}' for item in error_mapping[matched_text]) + error_types = "".join(f'- {item}' for item in error_mapping[matched_text]) return f'{matched_text}{error_types}' # Replace matches with wrapped spans diff --git a/src/language/templates/help_view.html b/src/language/templates/help_view.html index 0870c98..2e6d29c 100644 --- a/src/language/templates/help_view.html +++ b/src/language/templates/help_view.html @@ -20,7 +20,8 @@ top: 120%; left: 1em; z-index: 100; - border: 2px solid #fda; + width: max-content; + border: 2px solid #ec9; background: #fec; box-shadow: 3px 4px 8px 2px #0003; padding: 0.25em 0.5em; @@ -31,9 +32,6 @@ display: block; font-size: 120%; } -.writing_error .writing_error_details .item:before { - content: "- "; -} .writing_error:hover, .writing_error:focus { background: #fda5; border-radius: 5px;