Skip to content

Commit

Permalink
Fix Bugs in Swift Doc-Comment Generation (#3122)
Browse files Browse the repository at this point in the history
  • Loading branch information
InsertCreativityHere authored Nov 11, 2024
1 parent 140192b commit 57d604f
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 212 deletions.
4 changes: 2 additions & 2 deletions cpp/src/Slice/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,15 +659,15 @@ namespace

// Fix any link tags using the provided link formatter.
const string link = "{@link ";
pos = comment.find(link, pos);
pos = comment.find(link);
while (pos != string::npos)
{
string::size_type endpos = comment.find('}', pos);
if (endpos != string::npos)
{
// Extract the linked to identifier.
string::size_type identStart = comment.find_first_not_of(" \t", pos + link.size());
string::size_type identEnd = comment.find_last_not_of(" \t", endpos) + 1;
string::size_type identEnd = comment.find_last_not_of(" \t", endpos);
string ident = comment.substr(identStart, identEnd - identStart);

// Then erase the entire '{@link foo}' tag from the comment.
Expand Down
Loading

0 comments on commit 57d604f

Please sign in to comment.