html-to-react-components
html-to-react-components copied to clipboard
Unexcpected token
I was trying to convert this webpage to react: https://www.roseandfood.co.uk/ when I came across Unexcpected token error in between 1882 and 1885 lines here:
https://codesandbox.io/s/elated-lamarr-9obo2?file=/src/convert.js
I use Windows 10 and Node 10. Thank you for your recommandations
Maybe late response, but I had these issues with some whitespaces or invisible characters within the html. Cleaning up the document beforehand helped:
cleanHTML = cleanHTML.replace(/(\r\n|\n|\r)/gm, '').replace(/\s+/g, '');