@@ -14,7 +14,7 @@ const noopToResource: IFilePathToResourceConverter = {
14
14
} ;
15
15
16
16
suite ( 'typescript.previewer' , ( ) => {
17
- test ( 'Should ignore hyphens after a param tag' , async ( ) => {
17
+ test ( 'Should ignore hyphens after a param tag' , ( ) => {
18
18
assert . strictEqual (
19
19
tagsToMarkdown ( [
20
20
{
@@ -25,7 +25,7 @@ suite('typescript.previewer', () => {
25
25
'*@param* `a` — b' ) ;
26
26
} ) ;
27
27
28
- test ( 'Should parse url jsdoc @link' , async ( ) => {
28
+ test ( 'Should parse url jsdoc @link' , ( ) => {
29
29
assert . strictEqual (
30
30
documentationToMarkdown (
31
31
'x {@link http://www.example.com/foo} y {@link https://api.jquery.com/bind/#bind-eventType-eventData-handler} z' ,
@@ -35,7 +35,7 @@ suite('typescript.previewer', () => {
35
35
'x [http://www.example.com/foo](http://www.example.com/foo) y [https://api.jquery.com/bind/#bind-eventType-eventData-handler](https://api.jquery.com/bind/#bind-eventType-eventData-handler) z' ) ;
36
36
} ) ;
37
37
38
- test ( 'Should parse url jsdoc @link with text' , async ( ) => {
38
+ test ( 'Should parse url jsdoc @link with text' , ( ) => {
39
39
assert . strictEqual (
40
40
documentationToMarkdown (
41
41
'x {@link http://www.example.com/foo abc xyz} y {@link http://www.example.com/bar|b a z} z' ,
@@ -45,7 +45,7 @@ suite('typescript.previewer', () => {
45
45
'x [abc xyz](http://www.example.com/foo) y [b a z](http://www.example.com/bar) z' ) ;
46
46
} ) ;
47
47
48
- test ( 'Should treat @linkcode jsdocs links as monospace' , async ( ) => {
48
+ test ( 'Should treat @linkcode jsdocs links as monospace' , ( ) => {
49
49
assert . strictEqual (
50
50
documentationToMarkdown (
51
51
'x {@linkcode http://www.example.com/foo} y {@linkplain http://www.example.com/bar} z' ,
@@ -55,7 +55,7 @@ suite('typescript.previewer', () => {
55
55
'x [`http://www.example.com/foo`](http://www.example.com/foo) y [http://www.example.com/bar](http://www.example.com/bar) z' ) ;
56
56
} ) ;
57
57
58
- test ( 'Should parse url jsdoc @link in param tag' , async ( ) => {
58
+ test ( 'Should parse url jsdoc @link in param tag' , ( ) => {
59
59
assert . strictEqual (
60
60
tagsToMarkdown ( [
61
61
{
@@ -66,7 +66,7 @@ suite('typescript.previewer', () => {
66
66
'*@param* `a` — x [abc xyz](http://www.example.com/foo) y [b a z](http://www.example.com/bar) z' ) ;
67
67
} ) ;
68
68
69
- test ( 'Should ignore unclosed jsdocs @link' , async ( ) => {
69
+ test ( 'Should ignore unclosed jsdocs @link' , ( ) => {
70
70
assert . strictEqual (
71
71
documentationToMarkdown (
72
72
'x {@link http://www.example.com/foo y {@link http://www.example.com/bar bar} z' ,
@@ -76,7 +76,7 @@ suite('typescript.previewer', () => {
76
76
'x {@link http://www.example.com/foo y [bar](http://www.example.com/bar) z' ) ;
77
77
} ) ;
78
78
79
- test ( 'Should support non-ascii characters in parameter name (#90108)' , async ( ) => {
79
+ test ( 'Should support non-ascii characters in parameter name (#90108)' , ( ) => {
80
80
assert . strictEqual (
81
81
tagsToMarkdown ( [
82
82
{
@@ -135,7 +135,35 @@ suite('typescript.previewer', () => {
135
135
) ;
136
136
} ) ;
137
137
138
- test ( 'Should render @linkcode symbol name as code' , async ( ) => {
138
+ test ( 'Should not render @link inside of @example #187768' , ( ) => {
139
+ assert . strictEqual (
140
+ tagsToMarkdown ( [
141
+ {
142
+ "name" : "example" ,
143
+ "text" : [
144
+ {
145
+ "text" : "1 + 1 " ,
146
+ "kind" : "text"
147
+ } ,
148
+ {
149
+ "text" : "{@link " ,
150
+ "kind" : "link"
151
+ } ,
152
+ {
153
+ "text" : "foo" ,
154
+ "kind" : "linkName"
155
+ } ,
156
+ {
157
+ "text" : "}" ,
158
+ "kind" : "link"
159
+ }
160
+ ]
161
+ }
162
+ ] , noopToResource ) ,
163
+ '*@example* \n```\n1 + 1 {@link foo}\n```' ) ;
164
+ } ) ;
165
+
166
+ test ( 'Should render @linkcode symbol name as code' , ( ) => {
139
167
assert . strictEqual (
140
168
asPlainTextWithLinks ( [
141
169
{ "text" : "a " , "kind" : "text" } ,
@@ -155,7 +183,7 @@ suite('typescript.previewer', () => {
155
183
'a [`dog`](command:_typescript.openJsDocLink?%5B%7B%22file%22%3A%7B%22path%22%3A%22%2Fpath%2Ffile.ts%22%2C%22scheme%22%3A%22file%22%7D%2C%22position%22%3A%7B%22line%22%3A6%2C%22character%22%3A4%7D%7D%5D) b' ) ;
156
184
} ) ;
157
185
158
- test ( 'Should render @linkcode text as code' , async ( ) => {
186
+ test ( 'Should render @linkcode text as code' , ( ) => {
159
187
assert . strictEqual (
160
188
asPlainTextWithLinks ( [
161
189
{ "text" : "a " , "kind" : "text" } ,
0 commit comments