mirror of
https://github.com/docmost/docmost.git
synced 2026-09-01 03:15:32 +08:00
jump to search init
This commit is contained in:
@@ -144,6 +144,11 @@ export class SearchService {
|
||||
result.highlight = result.highlight
|
||||
.replace(/\r\n|\r|\n/g, ' ')
|
||||
.replace(/\s+/g, ' ');
|
||||
|
||||
const matchedText = result.highlight.match(/<b>([^<]*)<\/b>/i);
|
||||
result.matchedText = matchedText?.[1] ?? null;
|
||||
} else {
|
||||
result.matchedText = null;
|
||||
}
|
||||
return result;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user