Initial checklist
Affected packages and versions
9.0.X
Link to runnable example
No response
Steps to reproduce
The code component in components no longer accepts inline as a prop. In your example, you are using className to detect whether the code is inline or a block. This produces the below behaviour when no language is provided which deviates from standard Markdown rendering.
Expected behavior
Should be rendered as above, in a block, even without providing a language. When a language is not provided, className comes through as undefined - the same as an inline code. This can be partially escaped by using .includes('\n') (not shown in the demo code), although that adds complexity.
Actual behavior
Instead, languageless code is rendered like this, even when enclosed in triple quotes when using the demo snippet. Snippet should be updated to include the necessary .includes('\n'), or inline prop should be brought back.
Runtime
Node v17
Package manager
npm 8
OS
Windows
Build and bundle tools
Next.js
Initial checklist
Affected packages and versions
9.0.X
Link to runnable example
No response
Steps to reproduce
The
codecomponent incomponentsno longer acceptsinlineas a prop. In your example, you are using className to detect whether the code is inline or a block. This produces the below behaviour when no language is provided which deviates from standard Markdown rendering.Expected behavior
Should be rendered as above, in a block, even without providing a language. When a language is not provided,
classNamecomes through asundefined- the same as an inlinecode. This can be partially escaped by using.includes('\n')(not shown in the demo code), although that adds complexity.Actual behavior
Instead, languageless code is rendered
like this, even when enclosed in triple quotes when using the demo snippet. Snippet should be updated to include the necessary.includes('\n'), or inline prop should be brought back.Runtime
Node v17
Package manager
npm 8
OS
Windows
Build and bundle tools
Next.js