fix: scope of the getId function definition for `toc` helper
fix: scope of the getId function definition for `toc` helper

Signed-off-by: Richard Lea <5e20e57f18b15612bae274c2aef7dc395ee6b2a1@zoho.com>

ppker/hexo,kywk/hexi,hexojs/hexo,hexojs/hexo,kywk/hexi,ppker/hexo