@@ -1356,7 +1356,7 @@ describe("Comment Parser", () => {
1356
1356
it ( "Recognizes markdown links" , ( ) => {
1357
1357
const comment = getComment ( `/**
1358
1358
* [text](./relative.md) 
1359
- * Not relative: [passwd](/etc/passwd) [Windows](C:\\\\\\\\Windows) [example.com](http://example.com)
1359
+ * Not relative: [passwd](/etc/passwd) [Windows](C:\\\\\\\\Windows) [example.com](http://example.com) [hash](#hash)
1360
1360
*/` ) ;
1361
1361
1362
1362
equal ( comment . summary , [
@@ -1366,7 +1366,7 @@ describe("Comment Parser", () => {
1366
1366
{ kind : "relative-link" , text : "image.png" , target : 2 } ,
1367
1367
{
1368
1368
kind : "text" ,
1369
- text : ")\nNot relative: [passwd](/etc/passwd) [Windows](C:\\\\\\\\Windows) [example.com](http://example.com)" ,
1369
+ text : ")\nNot relative: [passwd](/etc/passwd) [Windows](C:\\\\\\\\Windows) [example.com](http://example.com) [hash](#hash) " ,
1370
1370
} ,
1371
1371
] satisfies CommentDisplayPart [ ] ) ;
1372
1372
} ) ;
@@ -1376,6 +1376,7 @@ describe("Comment Parser", () => {
1376
1376
* [1]: ./example.md
1377
1377
* [2]:<./example with space>
1378
1378
* [3]: https://example.com
1379
+ * [4]: #hash
1379
1380
*/` ) ;
1380
1381
1381
1382
equal ( comment . summary , [
@@ -1389,7 +1390,7 @@ describe("Comment Parser", () => {
1389
1390
} ,
1390
1391
{
1391
1392
kind : "text" ,
1392
- text : "\n[3]: https://example.com" ,
1393
+ text : "\n[3]: https://example.com\n[4]: #hash " ,
1393
1394
} ,
1394
1395
] satisfies CommentDisplayPart [ ] ) ;
1395
1396
} ) ;
@@ -1422,6 +1423,7 @@ describe("Comment Parser", () => {
1422
1423
* <a data-foo="./path.txt" href="./test.png" >
1423
1424
* <a href="./test space.png"/>
1424
1425
* <a href="https://example.com/favicon.ico">
1426
+ * <a href="#hash">
1425
1427
*/` ) ;
1426
1428
1427
1429
equal ( comment . summary , [
@@ -1435,7 +1437,7 @@ describe("Comment Parser", () => {
1435
1437
} ,
1436
1438
{
1437
1439
kind : "text" ,
1438
- text : '"/>\n<a href="https://example.com/favicon.ico">' ,
1440
+ text : '"/>\n<a href="https://example.com/favicon.ico">\n<a href="#hash"> ' ,
1439
1441
} ,
1440
1442
] satisfies CommentDisplayPart [ ] ) ;
1441
1443
} ) ;
0 commit comments