fix: remove non-breaking space in book title (#2974)

This commit is contained in:
Huang Xin
2026-01-16 12:02:41 +01:00
committed by GitHub
parent 6083de3293
commit 32ea42a835
3 changed files with 9 additions and 7 deletions
@@ -38,7 +38,9 @@ const BookCard = ({ book }: { book: Book }) => {
/>
</div>
<div className='min-w-0 flex-1'>
<h4 className='line-clamp-2 w-[90%] text-sm font-semibold'>{formatTitle(title)}</h4>
<h4 className='line-clamp-2 w-[90%] text-sm font-semibold'>
{formatTitle(title).replace(/\u00A0/g, ' ')}
</h4>
<p className='truncate text-xs opacity-75'>{formatAuthors(author)}</p>
</div>
<button
@@ -58,8 +58,8 @@ const BookDetailView: React.FC<BookDetailViewProps> = ({
</div>
<div className='title-author flex h-32 flex-col justify-between'>
<div>
<p className='text-base-content mb-2 line-clamp-2 text-lg font-bold'>
{formatTitle(book.title) || _('Untitled')}
<p className='text-base-content mb-2 line-clamp-2 break-words text-lg font-bold'>
{formatTitle(book.title).replace(/\u00A0/g, ' ') || _('Untitled')}
</p>
<p className='text-neutral-content line-clamp-1'>
{formatAuthors(book.author, book.primaryLanguage) || _('Unknown')}
@@ -545,14 +545,14 @@ export const initCache = async (
const {
preload = true,
preloadOptions = {
maxAge: 7 * 24 * 60 * 60 * 1000,
maxEntries: 1000,
maxAge: 30 * 24 * 60 * 60 * 1000,
maxEntries: 10000,
},
autoPrune = true,
pruneInterval = 60 * 60 * 1000,
pruneOptions = {
maxAge: 30 * 24 * 60 * 60 * 1000,
maxEntries: 10000,
maxAge: 90 * 24 * 60 * 60 * 1000,
maxEntries: 100000,
maxSizeInBytes: 10 * 1024 * 1024,
},
} = options;