Skip to content

Commit 486e4f5

Browse files
VaclavEliasikpil
authored andcommitted
feat: Minor improvements
1 parent 5903961 commit 486e4f5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tools/Box2D.NET.CommentConverter/Program.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
const string DoubleSlashCommentPrefix = "// ";
2-
const string TripleSlashCommentPrefix = "/// ";
2+
const string TripleSlashCommentPrefix = "///";
33
const string SummaryStart = "/// <summary>";
44
const string SummaryEnd = "/// </summary>";
55
const string FileFilter = "*.cs";
66

7+
var commentStarts = new HashSet<string> { DoubleSlashCommentPrefix, TripleSlashCommentPrefix };
78
var repoRoot = Directory.GetCurrentDirectory();
89

910
#if DEBUG
@@ -14,7 +15,7 @@
1415

1516
// Tests: B2BodySim, B2World, B2WorldId
1617
var files = Directory.GetFiles(folderPath, FileFilter, SearchOption.AllDirectories)
17-
//.Where(w => w.Contains("B2WorldId"))
18+
//.Where(w => w.Contains("B2PrismaticJointDef"))
1819
//.Take(50)
1920
.ToList();
2021

@@ -110,10 +111,8 @@ void AddBlockIfFollowedByPublic(int startIndex, int endIndex)
110111
}
111112
}
112113

113-
static List<int> ExtractCommentLineIndexes(List<string> lines)
114+
List<int> ExtractCommentLineIndexes(List<string> lines)
114115
{
115-
HashSet<string> commentStarts = [DoubleSlashCommentPrefix, TripleSlashCommentPrefix];
116-
117116
return lines
118117
.Select((line, index) => (line, index))
119118
.Where(item => commentStarts.Any(commentStart =>

0 commit comments

Comments
 (0)