react-diff-viewer-continued
react-diff-viewer-continued copied to clipboard
Bug- prism fails if the text in a code is empty line
Description When the user try to view the diff in split mode, if the old code and new code have, some empty line, prism throws error for syntax highlighting
Step to reproduce
- Use the Syntax Highlighting example
- Add some empty lines in new code variable, in the beggining (These variables should contain string value)
- Set split mode to true
Screenshot of error
Screenshot when split mode is false
Code sanbox
Link
Code sandbox example