You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... the problem doesn't occur with the mkdocs or readthedocs themes
... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
... the documentation does not mention anything about my problem
... there are no open or closed issues that are related to my problem
Description
There is a Chinese searching highlighting bug. If target query string is behind other Chinese text, searching highlighting mark does not show up. I think it's because match expression in highlighter/index.ts can not deal with this scenario.
I am not good at regex, but I found it could solved by adding another | in first group of expression (replace (^|${config.separator}|\\b) with (^|${config.separator}|\\b|)). Though it seems to work, I am not sure that could cause any side effect or not.
Expected behaviour
With query parameter h=公司 then modify match expression first group to (^|${config.separator}|\b|), and searching highlighting is working fine.
Actual behaviour
With query parameter h=公司, but searching highlighting is not working.
Fixed in a60ac14. I've tested your proposed solution and it seems that we can just remove the word boundary character, which solves the problem at hand. I've checked several words with and without the word boundary and came to the conclusion that it should work reasonably well. As already noted on Gitter, I'll have to revisit highlighting in the future again, but since the change fixes the issue now without seemingly introducing new problems, we'll go with that for now.
Contribution guidelines
I've found a bug and checked that ...
mkdocs
orreadthedocs
themescustom_dir
,extra_javascript
andextra_css
Description
There is a Chinese searching highlighting bug. If target query string is behind other Chinese text, searching highlighting mark does not show up. I think it's because match expression in highlighter/index.ts can not deal with this scenario.
I am not good at regex, but I found it could solved by adding another | in first group of expression (replace
(^|${config.separator}|\\b)
with(^|${config.separator}|\\b|)
). Though it seems to work, I am not sure that could cause any side effect or not.Expected behaviour
With query parameter h=公司 then modify match expression first group to (^|${config.separator}|\b|), and searching highlighting is working fine.
Actual behaviour
With query parameter h=公司, but searching highlighting is not working.
Steps to reproduce
Markdown content about TSMC from wiki:
Search with
公司
(means company)Package versions
Configuration
System information
The text was updated successfully, but these errors were encountered: