Skip to content

Commit 2bafa7a

Browse files
committed
Update YamlViewer.tsx
1 parent 18d3f63 commit 2bafa7a

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/components/Yaml/YamlViewer.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ const YamlViewer: FC<YamlViewerProps> = ({ yamlString, filename }) => {
3131
window.URL.revokeObjectURL(url);
3232
};
3333

34-
let formattedYaml = yamlString;
35-
try {
36-
const parsed = YAML.parse(yamlString);
37-
formattedYaml = YAML.stringify(parsed);
38-
} catch (error) {
39-
console.error('Invalid YAML:', error);
40-
}
4134
return (
4235
<div className={styles.container}>
4336
<FlexBox
@@ -74,7 +67,7 @@ const YamlViewer: FC<YamlViewerProps> = ({ yamlString, filename }) => {
7467
background: 'transparent',
7568
}}
7669
>
77-
{formattedYaml}
70+
{yamlString}
7871
</SyntaxHighlighter>
7972
</div>
8073
);

0 commit comments

Comments
 (0)