FIX: [STUDIO-1842] format wiki url's anchor
Change-Id: Ifb8f73a1674aecaaad5ef5e7248a142e8a0f0146
This commit is contained in:
parent
38ce4b94f4
commit
99b97ffeb4
|
@ -1221,7 +1221,15 @@ void ExtruderOptionsGroup::on_change_OG(const t_config_option_key& opt_id, const
|
||||||
wxString OptionsGroup::get_url(const std::string& path_end)
|
wxString OptionsGroup::get_url(const std::string& path_end)
|
||||||
{
|
{
|
||||||
//BBS
|
//BBS
|
||||||
return wxString::Format(L"https://wiki.bambulab.com/%s/software/bambu-studio/%s", L"en", from_u8(path_end));
|
wxString str = from_u8(path_end);
|
||||||
|
auto pos = str.find(L'#');
|
||||||
|
if (pos != size_t(-1)) {
|
||||||
|
pos++;
|
||||||
|
wxString anchor = str.Mid(pos).Lower();
|
||||||
|
anchor.Replace(L" ", "-");
|
||||||
|
str = str.Left(pos) + anchor;
|
||||||
|
}
|
||||||
|
return wxString::Format(L"https://wiki.bambulab.com/%s/software/bambu-studio/%s", L"en", str);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OptionsGroup::launch_browser(const std::string& path_end)
|
bool OptionsGroup::launch_browser(const std::string& path_end)
|
||||||
|
|
Loading…
Reference in New Issue