Skip to content

Bug - [CodeBlock ] - [eats up quotation marks and symbols between them] #10124

Closed
@Fewwy

Description

@Fewwy

Describe the problem
CodeBlock component
Backend developers requested to add this piece of code exactly how it looks to the UI. Component removes "\t" and "\n" inside the curly braces

<CodeBlock>
                  {`oc get namespace -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.uid}{"\n"}{end}'`}
                  <Divider />
                  {`oc -n <namespace> get <resourceKind> -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.uid}{"\n"}{end}'`}
                </CodeBlock>

CodeBlockCode component do not work as well

                  <CodeBlockCode>
                    {`oc get namespace -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.uid}{"\n"}{end}'`}
                    {`oc -n <namespace> get <resourceKind> -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.uid}{"\n"}{end}'`}
                  </CodeBlockCode>
                </CodeBlock>

How do you reproduce the problem?
Copy the piece of code I provided and try it.

Expected behavior
Code block shouldn't remove a piece of code

Is this issue blocking you?
Yes

Screenshots
If applicable, add screenshots to help explain the issue.
Example of the issue
image

With CodeBlockCode component
image

What is your environment?

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

What is your product and what release date are you targeting?

Any other information?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions