Handlebars:
Template
{{bold text}}
Preparation-Script
Handlebars.registerHelper("bold", function(text) {
  var result = "<b>" + Handlebars.escapeExpression(text) + "</b>";
  return new Handlebars.SafeString(result);
});
Input
{ text: "Isn't this great?" }
Output
<b>Isn&#x27;t this great?</b>
最后更新: 2020/1/11 15:46:21