Change: Into: ABC /// ABC /// DEF /// DEF
| 115 | // /// |
| 116 | // DEF /// DEF |
| 117 | string MakeComment(StringPiece text, StringPiece indent) { |
| 118 | string ret; |
| 119 | while (!text.empty()) { |
| 120 | int last_non_space = -1; |
| 121 | int newline; |
| 122 | for (newline = 0; newline < static_cast<int>(text.size()); ++newline) { |
| 123 | if (text[newline] == '\n') break; |
| 124 | if (text[newline] != ' ') last_non_space = newline; |
| 125 | } |
| 126 | if (last_non_space == -1) { |
| 127 | strings::StrAppend(&ret, indent, "///\n"); |
| 128 | } else { |
| 129 | strings::StrAppend(&ret, indent, "/// ", |
| 130 | text.substr(0, last_non_space + 1), "\n"); |
| 131 | } |
| 132 | text.remove_prefix(newline + 1); |
| 133 | } |
| 134 | return ret; |
| 135 | } |
| 136 | |
| 137 | string PrintString(const string& str) { |
| 138 | return strings::StrCat("\"", absl::CEscape(str), "\""); |
no test coverage detected