Skip to content

Commit 5a1408a

Browse files
committed
Merge pull request #25 from rubberduck-vba/next
sync with merged PR's in main repo
2 parents cdad2a0 + 272171c commit 5a1408a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

RetailCoder.VBE/ToDoItems/ToDoItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class ToDoItem
3535
public QualifiedSelection GetSelection() { return _selection; }
3636

3737
public ToDoItem(TodoPriority priority, CommentNode comment)
38-
: this(priority, comment.Comment.Remove(0, 1).Trim(), comment.QualifiedSelection)
38+
: this(priority, comment.CommentText, comment.QualifiedSelection)
3939
{
4040
}
4141

Rubberduck.Parsing/Nodes/CommentNode.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using Rubberduck.Parsing.Grammar;
23
using Rubberduck.VBEditor;
34

@@ -35,7 +36,7 @@ public CommentNode(string comment, QualifiedSelection qualifiedSelection)
3536
/// <summary>
3637
/// Gets the trimmed comment text, without the comment marker.
3738
/// </summary>
38-
public string CommentText { get { return _comment.Replace(Marker, string.Empty).TrimStart(); } }
39+
public string CommentText { get { return _comment.Remove(_comment.IndexOf("'", StringComparison.Ordinal), 1).Trim(); } }
3940

4041
/// <summary>
4142
/// The token used to indicate a comment.

0 commit comments

Comments
 (0)