diff options
author | Shawn Hussey <shawn@zeroc.com> | 2011-09-06 11:05:15 -0230 |
---|---|---|
committer | Shawn Hussey <shawn@zeroc.com> | 2011-09-06 11:05:15 -0230 |
commit | bc9b9ac863b51e19a3d8667fd980a9086c6a1383 (patch) | |
tree | 519bdb8d0938c3e443c5980b6bc41a907ab15b02 /cpp/src/slice2confluence/ConfluenceOutput.cpp | |
parent | Fixed Slice comment markup. (diff) | |
download | ice-bc9b9ac863b51e19a3d8667fd980a9086c6a1383.tar.bz2 ice-bc9b9ac863b51e19a3d8667fd980a9086c6a1383.tar.xz ice-bc9b9ac863b51e19a3d8667fd980a9086c6a1383.zip |
Fixed markup escaping to use backslashes instead of entity codes.
Diffstat (limited to 'cpp/src/slice2confluence/ConfluenceOutput.cpp')
-rw-r--r-- | cpp/src/slice2confluence/ConfluenceOutput.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/cpp/src/slice2confluence/ConfluenceOutput.cpp b/cpp/src/slice2confluence/ConfluenceOutput.cpp index 2f44679a474..cb28cd753b7 100644 --- a/cpp/src/slice2confluence/ConfluenceOutput.cpp +++ b/cpp/src/slice2confluence/ConfluenceOutput.cpp @@ -75,7 +75,7 @@ string Confluence::ConfluenceOutput::escapeComment(string comment) { list< pair<unsigned int,unsigned int> > escaperLimits = getMarkerLimits(comment); - string escapeChars = "\\{}-_*|[]"; + string escapeChars = "\\{}-_+*|[]"; //for each escape character for (string::iterator i = escapeChars.begin(); i < escapeChars.end(); ++i) @@ -85,39 +85,43 @@ Confluence::ConfluenceOutput::escapeComment(string comment) if (c == "\\") { - replacement = "\"; + replacement = "\\\\"; } else if (c == "{") { - replacement = "{"; + replacement = "\\{"; } else if (c == "}") { - replacement = "}"; + replacement = "\\}"; } else if (c == "-") { - replacement = "-"; + replacement = "\\-"; } else if (c == "*") { - replacement = "*"; + replacement = "\\*"; } else if (c == "|") { - replacement = "|"; + replacement = "\\|"; } else if (c == "_") { - replacement = "_"; + replacement = "\\_"; + } + else if (c == "+") + { + replacement = "\\+"; } else if (c == "[") { - replacement = "["; + replacement = "\\["; } else if (c == "]") { - replacement = "]"; + replacement = "\\]"; } size_t pos = comment.find(c); |