File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -251,6 +251,43 @@ describe('render', function() {
251251 </h6>`
252252 ) ;
253253 } ) ;
254+
255+ it ( 'ignore' , async function ( ) {
256+ const { docsify } = await init ( ) ;
257+ const output = docsify . compiler . compile (
258+ '## h2 tag <!-- {docsify-ignore} -->'
259+ ) ;
260+ expectSameDom (
261+ output ,
262+ `
263+ <h2 id="h2-tag">
264+ <a href="#/?id=h2-tag" data-id="h2-tag" class="anchor">
265+ <span>h2 tag </span>
266+ </a>
267+ </h2>`
268+ ) ;
269+ } ) ;
270+
271+ it ( 'ignore-all' , async function ( ) {
272+ const { docsify } = await init ( ) ;
273+ const output = docsify . compiler . compile (
274+ `# h1 tag <!-- {docsify-ignore-all} -->` + `\n## h2 tag`
275+ ) ;
276+ expectSameDom (
277+ output ,
278+ `
279+ <h1 id="h1-tag">
280+ <a href="#/?id=h1-tag" data-id="h1-tag" class="anchor">
281+ <span>h1 tag </span>
282+ </a>
283+ </h1>
284+ <h2 id="h2-tag">
285+ <a href="#/?id=h2-tag" data-id="h2-tag" class="anchor">
286+ <span>h2 tag</span>
287+ </a>
288+ </h2>`
289+ ) ;
290+ } ) ;
254291 } ) ;
255292
256293 describe ( 'link' , function ( ) {
You can’t perform that action at this time.
0 commit comments