Skip to content
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

[Bug]: em spaces are not preserved in chapter editor #3722

Open
Linden-Ryuujin opened this issue Dec 15, 2024 · 4 comments
Open

[Bug]: em spaces are not preserved in chapter editor #3722

Linden-Ryuujin opened this issue Dec 15, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Linden-Ryuujin
Copy link
Contributor

What happened?

If you prefix a chapter name with em spaces they are discarded on save.
em spaces are respected in m4b files, chapter file formats and in the audiobookself player (I use them to indent some chapters, particular if a book container multiple "parts").

e.g.

Part 1: The Start
  Chapter 1: Inside part 1

What did you expect to happen?

Em spaces should not be removed. Possibly all white space could be preserved? The audiobookself chapter format doesn't seem to have the same limitations as M4B (as fully quoted strings are used in the new json meta data files).

Steps to reproduce the issue

  1. Open chapter editor
  2. Begin chapter name with one or more em spaces e.g.   Chapter 1: Inside part 1
  3. Save Changes
  4. Check chapters and em spaces have been discarded.

Audiobookshelf version

v2.17.1

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Firefox

Logs

No response

Additional Notes

No response

@Linden-Ryuujin Linden-Ryuujin added the bug Something isn't working label Dec 15, 2024
@pwinnski
Copy link

I am amused by how closely in time this follows #3720, although they are about different metadata.

@advplyr
Copy link
Owner

advplyr commented Dec 21, 2024

Hmm I see what you mean but I wonder if most users would prefer to trim the whitespace. Usually when I see extra whitespace at the end of the string it's because some people instinctively press the spacebar after a word. Trimming trailing whitespace but leaving the leading whitespace could be the middle ground

@pwinnski
Copy link

Is there any harm in preserving all white space? Yes, there might be an unintentional extra space at the end, but people who care about such things could manually remove them, while people who don't care can leave them.

@advplyr
Copy link
Owner

advplyr commented Dec 21, 2024

Not really. The only thing I can think of is if the chapter title is only white space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants