Transformers not work with rose-pine theme and some langs like bash, yaml...
Author: augustanationalCreated Apr 29, 2026Updated Apr 29, 2026
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Describe the bug
I think it similer to https://github.com/shikijs/shiki/issues/1083 and https://github.com/shikijs/shiki/pull/1118.
But https://github.com/shikijs/shiki/pull/1118 only solved comment begin with //, so it only work with javascript, typescript ... With lang have comment begin with # like yaml, bash ... transformers not work with rose-pine theme.
Reproduction
<div id="foo"></div>
<script type="module">
import {
transformerNotationDiff,
// ...
} from 'https://esm.sh/@shikijs/transformers'
import { codeToHtml } from 'https://esm.sh/shiki'
const foo = document.getElementById('foo')
foo.innerHTML = await codeToHtml('foo # [!code ++]', {
lang: 'yaml',
theme: 'rose-pine-dawn',
transformers: [
transformerNotationDiff(),
// ...
],
})
</script>Contributes
- I am willing to submit a PR to fix this issue
- I am willing to submit a PR with failing tests
Source: shikijs/shiki