File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,6 +135,16 @@ final class CommentTests: SyntaxHighlighterTestCase {
135135 . plainText( " {} " )
136136 ] )
137137 }
138+
139+ func testCommentWithNumber( ) {
140+ let components = highlighter. highlight ( " // 1 " )
141+
142+ XCTAssertEqual ( components, [
143+ . token( " // " , . comment) ,
144+ . whitespace( " " ) ,
145+ . token( " 1 " , . comment)
146+ ] )
147+ }
138148
139149 func testCommentWithNoWhiteSpaceToPunctuation( ) {
140150 let components = highlighter. highlight ( """
@@ -177,6 +187,7 @@ extension CommentTests {
177187 ( " testMutliLineDocumentationComment " , testMutliLineDocumentationComment) ,
178188 ( " testCommentStartingWithPunctuation " , testCommentStartingWithPunctuation) ,
179189 ( " testCommentEndingWithComma " , testCommentEndingWithComma) ,
190+ ( " testCommentWithNumber " , testCommentWithNumber) ,
180191 ( " testCommentWithNoWhiteSpaceToPunctuation " , testCommentWithNoWhiteSpaceToPunctuation)
181192 ]
182193 }
You can’t perform that action at this time.
0 commit comments