mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-08-01 18:28:48 -04:00
Truncate search result text for performance reasons
This commit is contained in:
@@ -205,14 +205,16 @@ export default class Result {
|
||||
</h1>
|
||||
{section.text.length ?
|
||||
<p class="md-search-result__teaser">
|
||||
{{ __html: section.text.replace(match, highlight) }}
|
||||
{{ __html: this.truncate_(
|
||||
section.text.replace(match, highlight), 400)
|
||||
}}
|
||||
</p> : {}}
|
||||
</article>
|
||||
</a>
|
||||
)
|
||||
})}
|
||||
</li>
|
||||
) /* {this.truncate_(doc.text, 140)} */
|
||||
)
|
||||
})
|
||||
|
||||
/* Bind click handlers for anchors */
|
||||
|
||||
Reference in New Issue
Block a user