<CodeBlock> adds and removes spaces arbitrarily at the start of lines #2374
yzhang-stytch
started this conversation in
Bugs & Feedback
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The
<CodeBlock>component seems to be adding and removing whitespace at the start of lines arbitrarily.It always seems to strip two spaces from the start of every line. This is not documented, but it's not a huge deal.
More strangely, in one snippet, it seems to arbitrarily indent every line after the first by four spaces and I cannot figure out why it is this snippet specifically or how to turn it off.
Using fenced markdown code blocks fixes this, but we need the code snippet to include a prop dynamically from the parent page.
Things that don't seem to fix this:
<CodeBlock>into the page from the snippetBeta Was this translation helpful? Give feedback.
All reactions