mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-23 06:13:38 -04:00
Implemented lazy rendering of search results
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
export function truncate(string: string, n: number): string {
|
||||
let i = n
|
||||
if (string.length > i) {
|
||||
while (string[i] !== " " && --i > 0);
|
||||
while (string[i] !== " " && --i > 0); // tslint:disable-line
|
||||
return `${string.substring(0, i)}...`
|
||||
}
|
||||
return string
|
||||
|
||||
Reference in New Issue
Block a user