mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-23 14:23:39 -04:00
Fixed search highlighting for non-latin languages
This commit is contained in:
@@ -209,7 +209,7 @@ export default class Result {
|
||||
|
||||
/* Assemble highlight regex from query string */
|
||||
const match = new RegExp(
|
||||
`\\b(${escape(this.value_.trim()).replace(" ", "|")})`, "img")
|
||||
`(?:^|\\s)(${escape(this.value_.trim()).replace(" ", "|")})`, "img")
|
||||
const highlight = string => `<em>${string}</em>`
|
||||
|
||||
/* Render results */
|
||||
|
||||
Reference in New Issue
Block a user