Fix search highlight
This commit is contained in:
@@ -233,10 +233,13 @@ export class HighlightedMarkdown extends Component {
|
||||
} catch (e) {}
|
||||
} else {
|
||||
let search_kws = (
|
||||
props.search_param.match(/"[^"]*"|[^\s()+:"[\]-]+/g) || []
|
||||
props.search_param.match(/"[^"]*"|'[^']*'|[^\s()+:"'[\]-]+/g) ||
|
||||
[]
|
||||
)
|
||||
.map((s) =>
|
||||
s.startsWith('"') ? s.slice(1, -1) : s.split('^')[0],
|
||||
s.startsWith('"') || s.startsWith("'")
|
||||
? s.slice(1, -1)
|
||||
: s.split('^')[0],
|
||||
)
|
||||
.filter((s) => s);
|
||||
if (search_kws.length) {
|
||||
|
||||
Reference in New Issue
Block a user