chenzhutian / hexo-all-minifier

A plugin for Hexo that optimizes HTML, CSS, JS and imagages, and it can optionally deploys your blog.
MIT License
279 stars 30 forks source link

path is undefined #103

Open KumaNNN opened 4 years ago

KumaNNN commented 4 years ago

test.md

{% note default %}
#### Default Header
Welcome to [Hexo!](https://hexo.io)
{% endnote %}

{% note primary %}
#### Primary Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}

note tag from Next

Return error

INFO  update Optimize HTML: undefined [ 1.10% saved]
INFO  update Optimize HTML: undefined [ 1.01% saved]

path is undefined

Debugger in hexo-all-minifier\lib\optimizeHTML.js

... ...
log[options.silent ? 'debug' : 'info']('update Optimize HTML: %s [ %s saved]', path, saved + '%');
if (path == undefined) console.log(data);
... ...

Debugging results

INFO  update Optimize HTML: undefined [ 1.10% saved]
{
  text: '\n#### Default Header\n\nWelcome to [Hexo!](https://hexo.io)',
  engine: 'markdown'
}
INFO  update Optimize HTML: undefined [ 1.01% saved]
{
  text: '\n#### Primary Header\n\n**Welcome** to [Hexo!](https://hexo.io)',
  engine: 'markdown'
}

Why is it treated as a file?