Handlebars:
Template
{{foo bar}}
{{#foo bar}}abc{{/foo}}
Preparation-Script
// Handlebars.registerHelper('loud', function(string) {
//    return string.toUpperCase()
// });
Input
{}
Error
Missing helper: "foo"
Error: Missing helper: "foo" at Object.<anonymous> (/home/runner/work/docs/docs/node_modules/handlebars/lib/handlebars/helpers/helper-missing.js:10:13) at Object.wrapper (/home/runner/work/docs/docs/node_modules/handlebars/lib/handlebars/internal/wrapHelper.js:10:19) at Object.eval (eval at createFunctionContext (/home/runner/work/docs/docs/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js:265:23), <anonymous>:10:119) at main (/home/runner/work/docs/docs/node_modules/handlebars/lib/handlebars/runtime.js:230:22) at ret (/home/runner/work/docs/docs/node_modules/handlebars/lib/handlebars/runtime.js:250:12) at template (/home/runner/work/docs/docs/node_modules/handlebars/lib/handlebars/compiler/compiler.js:548:21) at compileAndRun (/home/runner/work/docs/docs/src/.vuepress/plugins/interactive-examples/lib/execute-example.js:29:10) at executeExample (/home/runner/work/docs/docs/src/.vuepress/plugins/interactive-examples/lib/execute-example.js:5:10) at ExampleParser._executeAndBuildExample (/home/runner/work/docs/docs/src/.vuepress/plugins/interactive-examples/lib/example-parser.js:40:22) at ExampleParser.parse (/home/runner/work/docs/docs/src/.vuepress/plugins/interactive-examples/lib/example-parser.js:26:17) at extendPageData (/home/runner/work/docs/docs/src/.vuepress/plugins/interactive-examples/index.js:25:49) at /home/runner/work/docs/docs/node_modules/@vuepress/core/lib/node/Page.js:293:19 at Array.map (<anonymous>) at Page.enhance (/home/runner/work/docs/docs/node_modules/@vuepress/core/lib/node/Page.js:290:17) at Page.process (/home/runner/work/docs/docs/node_modules/@vuepress/core/lib/node/Page.js:148:16) at App.addPage (/home/runner/work/docs/docs/node_modules/@vuepress/core/lib/node/App.js:354:5)
最后更新: 2020/1/11 15:46:21