Commit 6baad05 1 parent 9edf4b1 commit 6baad05 Copy full SHA for 6baad05
File tree 4 files changed +56
-0
lines changed
4 files changed +56
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ Markdown and you therefore do not wish for it to be accidentally interpreted
10
10
as such by the likes of Visual Studio Code or if you wish to view it escaped
11
11
within it or your documentation.
12
12
13
+ ` @example ` tag content will not be checked.
14
+
13
15
## Fixer
14
16
15
17
(TODO)
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ Markdown and you therefore do not wish for it to be accidentally interpreted
19
19
as such by the likes of Visual Studio Code or if you wish to view it escaped
20
20
within it or your documentation.
21
21
22
+ ` @example ` tag content will not be checked.
23
+
22
24
<a name =" user-content-text-escaping-fixer " ></a >
23
25
<a name =" text-escaping-fixer " ></a >
24
26
## Fixer
@@ -175,5 +177,21 @@ The following patterns are not considered problems:
175
177
* to escape
176
178
*/
177
179
// "jsdoc/text-escaping": ["error"|"warn", {"escapeHTML":true}]
180
+
181
+ /**
182
+ * @example
183
+ * ```
184
+ * Some things to escape: <a> and > and ઼ and `test`
185
+ * ```
186
+ */
187
+ // "jsdoc/text-escaping": ["error"|"warn", {"escapeHTML":true}]
188
+
189
+ /**
190
+ * @example
191
+ * ```
192
+ * Some things to escape: <a> and > and ઼ and `test`
193
+ * ```
194
+ */
195
+ // "jsdoc/text-escaping": ["error"|"warn", {"escapeMarkdown":true}]
178
196
````
179
197
Original file line number Diff line number Diff line change @@ -73,6 +73,9 @@ export default iterateJsdoc(({
73
73
}
74
74
75
75
for ( const tag of jsdoc . tags ) {
76
+ if ( tag . tag === 'example' ) {
77
+ continue ;
78
+ }
76
79
if ( /** @type {string[] } */ (
77
80
utils . getTagDescription ( tag , true )
78
81
) . some ( ( desc ) => {
@@ -100,6 +103,9 @@ export default iterateJsdoc(({
100
103
}
101
104
102
105
for ( const tag of jsdoc . tags ) {
106
+ if ( tag . tag === 'example' ) {
107
+ continue ;
108
+ }
103
109
if ( /** @type {string[] } */ (
104
110
utils . getTagDescription ( tag , true )
105
111
) . some ( ( desc ) => {
Original file line number Diff line number Diff line change @@ -316,5 +316,35 @@ export default /** @type {import('../index.js').TestCases} */ ({
316
316
} ,
317
317
] ,
318
318
} ,
319
+ {
320
+ code : `
321
+ /**
322
+ * @example
323
+ * \`\`\`
324
+ * Some things to escape: <a> and > and ઼ and \`test\`
325
+ * \`\`\`
326
+ */
327
+ ` ,
328
+ options : [
329
+ {
330
+ escapeHTML : true ,
331
+ } ,
332
+ ]
333
+ } ,
334
+ {
335
+ code : `
336
+ /**
337
+ * @example
338
+ * \`\`\`
339
+ * Some things to escape: <a> and > and ઼ and \`test\`
340
+ * \`\`\`
341
+ */
342
+ ` ,
343
+ options : [
344
+ {
345
+ escapeMarkdown : true ,
346
+ } ,
347
+ ]
348
+ } ,
319
349
] ,
320
350
} ) ;
You can’t perform that action at this time.
0 commit comments