yoeman 生成器未转换单引号或双引号

single or double quotation not being converted by yoeman generator

" 或 ' 在使用 yoeman 生成器后我的输出文件中没有生成!它们被转换为 ' 或 " 而不是 " 或 ' 。我试过使用 \' 、 \" 和 """;

我在我的模型模板中使用 <%=texts%> 来获取值。使用 <%- texts%> 解决了这个问题。

之前的代码是:

var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var <%= module_name%>Schema = {

......................

<%= texts%>

......................

module.exports = <%=module_name%>;

固定代码为:

var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var <%= module_name%>Schema = {

......................

<%-texts%>

......................

module.exports = <%=module_name%>;