mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-02 22:46:56 -05:00
[Bug]: em spaces are not preserved in chapter editor #2601
Labels
No labels
authentication
awaiting release
backlog
bug
chapter editor
config-issue
ebooks
encoding/embedding
enhancement
help wanted
listening sessions & progress
planned
possible plugin
progress sync
sorting/filtering/searching
unable to reproduce
upload
users & permissions
waiting
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/audiobookshelf#2601
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Linden-Ryuujin on GitHub (Dec 14, 2024).
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.
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
Chapter 1: Inside part 1Audiobookshelf 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
@pwinnski commented on GitHub (Dec 16, 2024):
I am amused by how closely in time this follows #3720, although they are about different metadata.
@advplyr commented on GitHub (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 commented on GitHub (Dec 21, 2024):
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 commented on GitHub (Dec 21, 2024):
Not really. The only thing I can think of is if the chapter title is only white space.
@ZLoth commented on GitHub (Feb 6, 2025):
This issue follows closely with the (rejected) feature request https://github.com/advplyr/audiobookshelf/issues/3421 in which a chapter title can be bolded/italicized/underlined to highlight different sections of the book, or for this user's case, indented. This can be part of the metadata.json file: