feat(shiki): add test coverage for excluded langs

This commit is contained in:
Lars Kappert 2023-09-12 09:21:18 +02:00
parent 86f75940f1
commit 41fa7f8ea7
3 changed files with 8 additions and 0 deletions

View file

@ -92,6 +92,9 @@ describe('Astro Markdown Shiki', () => {
expect(unknownLang).to.be.equal(
'<span style="color: #e1e4e8">This language does not exist</span>'
);
const excludedLang = $('.language-shell').html().trim();
expect(excludedLang).to.be.equal('This language code block is excluded');
});
});

View file

@ -14,6 +14,7 @@ export default {
aliases: ['ri'],
},
],
excludeLangs: ['shell']
},
},
}

View file

@ -24,3 +24,7 @@ fin
```unknown
This language does not exist
```
```shell
This language code block is excluded
```