Remove spaces in templates/hms.html.twig

Created on 11 June 2018, about 6 years ago
Updated 3 March 2023, over 1 year ago

This is not critical, but the way the templates/hms.html.twig file is written can cause some formatting issues. For example I needed a View block that includes a time range, so it uses two fields of a node: start and end, both fields are created with HMS Field.

When I used these fields in Views, they are rendered with multiple spaces before and after the actual value. So it looks like this: "8 - 10". In my country, it is not ok to use spaces between the range separator, so I have to make it look like this: "8-10".

The reason those spaces appear there is because the templates/hms.html.twig file includes indentations and line breaks. Now I don't know the actual reason behind this behaviour, as indentations and line breaks are a pretty big part of well written code, but maybe this could be avoided with a workaround. Now I just hacked the file and put it all on one line.

But maybe it could be a formatting option to either include or exclude the spaces in the UI.

✨ Feature request
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024