-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a custom separator to improve search results in the documentation #4383
Conversation
elasticsearch_and_cassandra_27 / elasticsearch_and_cassandra_mnesia / 5a22f03 small_tests_26 / small_tests / 5a22f03 small_tests_27 / small_tests / 5a22f03 small_tests_27_arm64 / small_tests / 5a22f03 ldap_mnesia_26 / ldap_mnesia / 5a22f03 ldap_mnesia_27 / ldap_mnesia / 5a22f03 dynamic_domains_mysql_redis_27 / mysql_redis / 5a22f03 internal_mnesia_27 / internal_mnesia / 5a22f03 dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 5a22f03 dynamic_domains_mssql_mnesia_27 / odbc_mssql_mnesia / 5a22f03 dynamic_domains_pgsql_mnesia_27 / pgsql_mnesia / 5a22f03 pgsql_cets_27 / pgsql_cets / 5a22f03 mysql_redis_27 / mysql_redis / 5a22f03 sm_SUITE:ws_tests:ping_timeout{error,{{badmatch,false},
[{escalus_session,stream_resumption,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_session.erl"},
{line,259}]},
{escalus_connection,connection_step,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
{line,161}]},
{lists,foldl_1,3,[{file,"lists.erl"},{line,2151}]},
{escalus_connection,start,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
{line,145}]},
{sm_helper,connect_spec,3,
[{file,"/home/circleci/project/big_tests/tests/sm_helper.erl"},
{line,154}]},
{sm_SUITE,ping_timeout,1,
[{file,"/home/circleci/project/big_tests/tests/sm_SUITE.erl"},
{line,656}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1794}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1303}]}]}} cockroachdb_cets_27 / cockroachdb_cets / 5a22f03 pgsql_mnesia_26 / pgsql_mnesia / 5a22f03 pgsql_mnesia_27 / pgsql_mnesia / 5a22f03 mssql_mnesia_27 / odbc_mssql_mnesia / 5a22f03 mysql_redis_27 / mysql_redis / 5a22f03 sm_SUITE:tcp_tests:ping_timeout{error,{{assertion_failed,assert,is_presence,
{xmlel,<<"r">>,
[{<<"xmlns">>,<<"urn:xmpp:sm:3">>}],
[]},
"<r xmlns='urn:xmpp:sm:3'/>"},
[{escalus_new_assert,assert_true,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
{line,84}]},
{sm_helper,initial_presence_step,2,
[{file,"/home/circleci/project/big_tests/tests/sm_helper.erl"},
{line,136}]},
{escalus_connection,connection_step,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
{line,163}]},
{lists,foldl_1,3,[{file,"lists.erl"},{line,2151}]},
{escalus_connection,start,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
{line,145}]},
{sm_helper,connect_spec,3,
[{file,"/home/circleci/project/big_tests/tests/sm_helper.erl"},
{line,154}]},
{sm_SUITE,ping_timeout,1,
[{file,"/home/circleci/project/big_tests/tests/sm_SUITE.erl"},
{line,656}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1794}]}]}} mysql_redis_27 / mysql_redis / 5a22f03 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4383 +/- ##
==========================================
+ Coverage 85.18% 85.26% +0.07%
==========================================
Files 550 550
Lines 33842 33842
==========================================
+ Hits 28829 28855 +26
+ Misses 5013 4987 -26 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Nice to see the search function improved.
This PR adds a custom separator regex to the MkDocs search plugin to improve how search works. It helps split text into searchable pieces, which is important for technical content like code, settings and XMPP stanzas.
How the Regex Works
[\s\-_,:!=\[\]()"/<>]+
: Matches spaces, punctuation, and special characters like underscores.\.(?!\d)
: Splits at periods, but not if they’re part of a decimal number.&[lg]t;
: Matches HTML entities like<
and>
.It makes searching for configuration options easier. For example, you can now find
modules.mod_mam.pm.same_mam_id_for_peers
by searching for parts likesame_mam_id_for_peers
,id_for_peers
, or evenmam peers
. Also, XMPP stanzas are now included in the results. So, if you search forpresence
, you’ll see results like<presence/>
and<presence type="unavailable"></presence>
.