No `display: grid;` was added to `code` element by default
GoodbyeNJN opened this issue · comments
GoodbyeNJN commented
According to the changelog of v0.10.0:
grid: true
option has been added to prevent lines from collapsing by default with code blocks, allowing you to remove the onVisitLine callback hook.
And the code of processing grid: true
option:
if (grid && codeElement.properties) {
codeElement.properties.style += 'display: grid;';
}
https://github.com/atomiks/rehype-pretty-code/blob/master/src/index.ts#L268-L270
It seems a property style="display: grid;"
should be added to code
element, but it does not take effect in the current version.
It looks like a bug, I would open a new pull request.