fix: only replace quote punctuations for vertical layout, closes #761 (#767)

This commit is contained in:
Huang Xin
2025-03-30 15:49:22 +08:00
committed by GitHub
parent 7cb1998ebb
commit e70c46ff02
2 changed files with 5 additions and 20 deletions
@@ -80,7 +80,6 @@ const BooksGrid: React.FC<BooksGridProps> = ({ bookKeys, onCloseBook }) => {
onSetSettingsDialogOpen={setFontLayoutSettingsDialogOpen}
/>
<FoliateViewer bookKey={bookKey} bookDoc={bookDoc} config={config} />
<FootnotePopup bookKey={bookKey} bookDoc={bookDoc} />
{viewSettings.vertical && viewSettings.scrolled && (
<>
<div
@@ -138,6 +137,7 @@ const BooksGrid: React.FC<BooksGridProps> = ({ bookKeys, onCloseBook }) => {
/>
)}
<Annotator bookKey={bookKey} />
<FootnotePopup bookKey={bookKey} bookDoc={bookDoc} />
<FooterBar
bookKey={bookKey}
bookFormat={book.format}
@@ -1,25 +1,10 @@
import type { Transformer } from './types';
const punctuationMap: Record<string, string> = {
'': '', // full-width comma
'': '', // full stop
'': '', // enumeration comma
'': '', // colon
'': '︔', // semicolon
'': '︕', // exclamation
'': '︖', // question
'': '︵',
'': '︶',
'《': '︽',
'》': '︾',
'「': '﹁',
'」': '﹂',
'『': '﹃',
'』': '﹄',
'“': '﹁',
'”': '﹂',
'': '﹃',
'': '﹄',
'': '',
'': '',
'': '',
'': '',
};
export const punctuationTransformer: Transformer = {