-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed the first underscore which was ignored #12455
base: main
Are you sure you want to change the base?
Conversation
Thanks, please add a changelog entry and add a test |
@laky241 do not remove the mandatory checks from the PR description. |
@subhramit I’ll keep this in mind for future PRs. If there’s a way to add the mandatory checks now, please guide me, and I’ll update it. |
@@ -119,6 +119,7 @@ public static String truncateString(String text, int maxCharacters, String ellip | |||
if (ellipsisString == null) { | |||
ellipsisString = ""; | |||
} | |||
text = text.replace("_", "__"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a) this will replace every occurend of an underscore. We only need to do ths if the first char is a underscore
b) This is not the correct position to do the replacement as the method should not do any magic as otherwise specificed (e.g. truncate)
=> Better create a new method for replaceFirstUnderscore and call this where needed
Please note: If you do not guarantee that you own the copyright to your changes and you licence them under the terms of the MIT license agreement, we cannot accept your changes. |
Fixes #12215
When multiple files were attached the tooltip and context menu in the "Linked File" tab removed the first underscore (_) from file names.
the file paths were correct internally and opened the right files.
javaFX treats _ as a shortcut key indicator
I updated ControlHelper.truncateString() to replace single underscores (_) with double underscores (__) before displaying text in the UI.
attached the SS of the fix
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if change is visible to the user)