refactor(nav): refactor book nav service with TOC enrichment (#3874)
This commit is contained in:
@@ -24,7 +24,7 @@ import { useTextSelector } from '../../hooks/useTextSelector';
|
||||
import { Point, Position, TextSelection } from '@/utils/sel';
|
||||
import { getPopupPosition, getPosition, getTextFromRange } from '@/utils/sel';
|
||||
import { eventDispatcher } from '@/utils/event';
|
||||
import { findTocItemBS } from '@/utils/toc';
|
||||
import { findTocItemBS } from '@/services/nav';
|
||||
import { throttle } from '@/utils/throttle';
|
||||
import { runSimpleCC } from '@/utils/simplecc';
|
||||
import { getWordCount } from '@/utils/word';
|
||||
|
||||
@@ -195,7 +195,10 @@ const ExportMarkdownDialog: React.FC<ExportMarkdownDialogProps> = ({
|
||||
}
|
||||
if (pageStr || timestampStr) {
|
||||
lines.push('');
|
||||
const infoStr = pageStr ? `${pageStr} · ${timestampStr}`.trim() : timestampStr;
|
||||
const infoStr =
|
||||
pageStr && timestampStr
|
||||
? `${pageStr} · ${timestampStr}`.trim()
|
||||
: pageStr || timestampStr;
|
||||
lines.push(`*${infoStr}*`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user