patternfly-react
patternfly-react copied to clipboard
Bug - [CodeBlock ] - [eats up quotation marks and symbols between them]
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
<CodeBlock> <CodeBlockCode> {
oc get namespace -o jsonpath='{range .items[]}{.metadata.name}{"\t"}{.metadata.uid}{"\n"}{end}'} {
oc -n } </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
With CodeBlockCode component
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?