1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-10-31 19:36:16 +00:00

Merge pull request #302 from ammongit/crossroads-wiki

Add exception for handling of "Crossroads" in wiki links
This commit is contained in:
Zeno Rogue 2022-02-27 14:59:45 +01:00 committed by GitHub
commit 13cbece9df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -732,6 +732,11 @@ EX void open_url(string s) {
const char *urlhex = "0123456789ABCDEF"; const char *urlhex = "0123456789ABCDEF";
EX void open_wiki(const char *title) { EX void open_wiki(const char *title) {
// Since "Crossroads" is ambiguous, we use the direct link to Crossroads I.
if (!strcmp(title, "Crossroads")) {
title = "Crossroads (Land)";
}
string url = "https://hyperrogue.miraheze.org/wiki/"; string url = "https://hyperrogue.miraheze.org/wiki/";
unsigned char c; unsigned char c;
for (size_t i = 0; (c = title[i]); ++i) { for (size_t i = 0; (c = title[i]); ++i) {