Hexo - Template render error(Solved!!)

Moving my blog from Octopress to Hexo for almost half a year, everything is quit user-friendly(docs, writing experience, etc.), except the Template render error caused by invisible zero width characters, e.g. \u2028!!!

There is official troubleshooting solution for this issue, but does not mention the main root cause and solution.

BUG!

Exception raised by hexo s --debug:

Template render error: (unknown path)
SyntaxError: Invalid or unexpected token

Solution

Install plugin Zero Width Characters locator in WebStorm :

1. Realtime inspection

This plugin will remind u all the invisible zero width characters in realtime:

2. Inspecting globally

  1. Step 1: trigger searching actions(⌘ + shift + A):
  2. Step 2: find all annoying zero width unicode characters and fix them!!!

EOF