Fix bug in inline expectations test implementation

This was stopping trailing comments, as in `// $ Alert // some comment`, from working.
This commit is contained in:
Owen Mansel-Chan
2026-06-15 21:06:03 +01:00
parent 14c72def96
commit bc9fa6ba13

View File

@@ -15,7 +15,7 @@ module Impl implements InlineExpectationsTestSig {
ExpectationComment() { this = MkExpectationComment(comment) }
/** Returns the contents of the given comment, _without_ the preceding comment marker (`//`). */
string getContents() { result = comment.getText().suffix(2) }
string getContents() { result = comment.getText().suffix(2).trim() }
/** Gets a textual representation of this element. */
string toString() { result = comment.toString() }