File tree Expand file tree Collapse file tree 4 files changed +56
-0
lines changed Expand file tree Collapse file tree 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
1010as such by the likes of Visual Studio Code or if you wish to view it escaped
1111within it or your documentation.
1212
13+ ` @example `  tag content will not be checked.
14+ 
1315## Fixer  
1416
1517(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
1919as such by the likes of Visual Studio Code or if you wish to view it escaped
2020within it or your documentation.
2121
22+ ` @example `  tag content will not be checked.
23+ 
2224<a  name =" user-content-text-escaping-fixer " ></a >
2325<a  name =" text-escaping-fixer " ></a >
2426## Fixer  
@@ -175,5 +177,21 @@ The following patterns are not considered problems:
175177 * to escape 
176178 */  
177179//  "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}]
178196```` 
179197
Original file line number Diff line number Diff line change @@ -73,6 +73,9 @@ export default iterateJsdoc(({
7373    } 
7474
7575    for  ( const  tag  of  jsdoc . tags )  { 
76+       if  ( tag . tag  ===  'example' )  { 
77+         continue ; 
78+       } 
7679      if  ( /** @type  {string[] } */  ( 
7780        utils . getTagDescription ( tag ,  true ) 
7881      ) . some ( ( desc )  =>  { 
@@ -100,6 +103,9 @@ export default iterateJsdoc(({
100103  } 
101104
102105  for  ( const  tag  of  jsdoc . tags )  { 
106+     if  ( tag . tag  ===  'example' )  { 
107+       continue ; 
108+     } 
103109    if  ( /** @type  {string[] } */  ( 
104110      utils . getTagDescription ( tag ,  true ) 
105111    ) . some ( ( desc )  =>  { 
Original file line number Diff line number Diff line change @@ -316,5 +316,35 @@ export default /** @type {import('../index.js').TestCases} */ ({
316316        } , 
317317      ] , 
318318    } , 
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+     } , 
319349  ] , 
320350} ) ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments