【问题标题】:set noemptypipe true in html2jade options, programmatic usage在 html2jade 选项中设置 noemptypipe true,程序化使用
【发布时间】:2015-09-14 20:46:32
【问题描述】:

我在其编程用法中使用html2jade,我想将 noemptypipe 选项设置为 true。

到目前为止我已经尝试过

html2jade.convertHtml(html, {
    noemptypipe: true
}, function(err, jade) {
    if (err) throw err;
    console.log(jade);
});

html2jade.convertHtml(html, {
    noEmptyPipe: true
}, function(err, jade) {
    if (err) throw err;
    console.log(jade);
});

html2jade.convertHtml(html, {
    writer: {
        noEmptyPipe: true
    }
}, function(err, jade) {
    if (err) throw err;
    console.log(jade);
});

html2jade.convertHtml(html, {
    writer: {
        noemptypipe: true
    }
}, function(err, jade) {
    if (err) throw err;
    console.log(jade);
});

但它们都不起作用。我在任何地方都找不到有关如何执行此操作的任何文档,而且我无法弄清楚发生了什么 code.

【问题讨论】:

    标签: html node.js pug


    【解决方案1】:

    事实证明这个工作正常,

    html2jade.convertHtml(html, {
        noemptypipe: true
    }, function(err, jade) {
        if (err) throw err;
        console.log(jade);
    });
    

    我一定是拼错了 noemptypipe。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-08-24
      • 1970-01-01
      • 1970-01-01
      • 2012-10-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多