Fixing invalid regular expression error with highlight.js and Next.js production build

Fixing issue that occurs only on production build of Next.js when using highlight.js for syntax highlighting.