summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/reflist.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/reflist.cpp b/src/reflist.cpp
index 7ae4c80..59f7ad4 100644
--- a/src/reflist.cpp
+++ b/src/reflist.cpp
@@ -171,7 +171,26 @@ void RefList::generatePage()
doc += item->name;
doc += " \"";
// escape \'s in title, see issue #5901
- doc += substitute(item->title,"\\","\\\\");
+ // prevent Obj-C names in e.g. todo list are seen as emoji
+ if (item->scope)
+ {
+ switch(item->scope->definitionType())
+ {
+ case Definition::TypeClass:
+ case Definition::TypeNamespace:
+ case Definition::TypeMember:
+ case Definition::TypePackage:
+ doc += substitute(substitute(item->title,"\\","\\\\"),":","∷");
+ break;
+ default:
+ doc += substitute(item->title,"\\","\\\\");
+ break;
+ }
+ }
+ else
+ {
+ doc += substitute(item->title,"\\","\\\\");
+ }
doc += "\" ";
// write declaration in case a function with arguments
if (!item->args.isEmpty())