Skip to content

Commit

Permalink
workarounding strings replaced by doxygen core
Browse files Browse the repository at this point in the history
this reverts the strings below:

"_8" = "."
"_2" = "/"
"__" = "_"

pull request doxygen/doxygen#577
  • Loading branch information
joenio committed Aug 4, 2019
1 parent f80f348 commit aa21a4b
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions addon/doxyparse/doxyparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,33 @@ static bool ignoreStaticExternalCall(MemberDef *context, MemberDef *md) {
}
}

// that undo some replacing by src/util.cpp escapeCharsInString(...)
// * https://github.com/doxygen/doxygen/pull/577
std::string unescapeCharsInString(std::string name) {
QCString module = QCString(name.c_str());
bool replaced = false;
if (module.find('.') == -1) {
module.replace(QRegExp("_8"), ".");
replaced = true;
}
if (module.find('/') == -1) {
module.replace(QRegExp("_2"), "/");
replaced = true;
}
if (replaced) {
module.replace(QRegExp("__"), "_");
}
return module.data();
}

static void startYamlDocument() {
printf("---\n");
}
static void printFile(std::string file) {
printf("%s:\n", file.c_str());
}
static void printModule(std::string module) {
printf(" \"%s\":\n", module.c_str());
printf(" \"%s\":\n", unescapeCharsInString(module).c_str());
}
static void printClassInformation(std::string information) {
printf(" information: %s\n", information.c_str());
Expand Down Expand Up @@ -161,7 +180,7 @@ static void printUses() {
static void printReferenceTo(std::string type, std::string signature, std::string defined_in) {
printf(" - \"%s\":\n", signature.substr(0, 1022).c_str());
printf(" type: %s\n", type.c_str());
printf(" defined_in: \"%s\"\n", defined_in.c_str());
printf(" defined_in: \"%s\"\n", unescapeCharsInString(defined_in).c_str());
}
static void printNumberOfConditionalPaths(MemberDef* md) {
printf(" conditional_paths: %d\n", md->numberOfFlowKeyWords());
Expand Down

0 comments on commit aa21a4b

Please sign in to comment.