suren-atoyan / monaco-react

Monaco Editor for React - use the monaco-editor in any React application without needing to use webpack (or rollup/parcel/etc) configuration files / plugins
https://monaco-react.surenatoyan.com/
MIT License
3.81k stars 268 forks source link

[Bug] No code folding in Diff View #654

Open rahulthewall opened 2 weeks ago

rahulthewall commented 2 weeks ago

Describe the bug I am using the Monaco Editor in a React application to view the differences between two XML files. While the diff view works well for highlighting changes, I am unable to collapse or expand the XML sections by tags, a feature that is available when viewing a single XML file in the Monaco Editor.

To Reproduce

Steps to reproduce the behavior:

  1. Use diff view to compare two XML files
  2. Use XML view to view the same file as the one in diff view
  3. Code folding works for single file view, not for diff view

Code snippet to reproduce the issue: https://codesandbox.io/p/sandbox/boring-mcnulty-k2jpph