hexojs / hexo-renderer-markdown-it

Markdown-it is a Markdown parser, done right. A faster and CommonMark compliant alternative for Hexo.
MIT License
344 stars 60 forks source link

`post_asset` doesn't work after upgrading Hexo to v7.2.0 #218

Closed hv0905 closed 3 months ago

hv0905 commented 3 months ago

Check List

Describe the bug

post assets doesn't work after upgrading Hexo to latest(v7.2.0).

The follow syntax in posts:

[screenshot-1](1.png)

Doesn't render the image as a link to {post_path}/1.png, instead, render as /1.png. The 1.png can be access from {post_path}/1.png corrently.

I've enabled markdown.images.post_asset and post_asset_folder in _config.yml

Expected behavior

Render the image into the post's own relative folder corrently.

How to reproduce

  1. Create a hexo project, change it's renderer to markdown-it, enable post assets in _config.yml
  2. Create a post.
  3. Add an image into its assets folder.
  4. Link the image using markdown syntax in the post.
  5. Both live-server and production build doesn't work.

Screenshots

No response

Environment information

Windows 11
NodeJS 21.7.1
Hexo 7.2.0 (Affected)
Hexo 7.1.1 (Last unaffected version)
hexo-renderer-markdown-it 7.1.1
markdown-it 14.1.0

Additional context

No response

yoshinorin commented 3 months ago

@hv0905 We just released v7.3.0. Would you please try it? This issue maybe fixed.

hv0905 commented 3 months ago

@hv0905 We just released v7.3.0. Would you please try it? This issue maybe fixed.

Yes. It seems that the problem have been solved in v7.3.0. Thanks!