You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hook.beforeEach(function(content){letmark_imgReg=/!\[(?<alt>[^\]]*)\]\((?<filename>.*?)(?=\"|\))(?<title>\".*\")?\)/g;letmark_img=content.match(mark_imgReg);if(mark_img){mark_img.forEach(function(item,idx){console.log(item,idx)letmatch=mark_imgReg.exec(item);console.log(match)if(match){if(match.groups.alt){content=content.replace(item,`<figure><img src="${match.groups.filename}" width="100%" alt="${match.groups.alt}" title = "${match.groups.title}"> <figcaption>${match.groups.alt}</figcaption></figure>`)}else{content=content.replace(item,`<figure><img src="${match.groups.filename}" width="100%" alt="${match.groups.alt}" title = "${match.groups.title}"></figure>`)}}})}})
What is current behaviour
See screenshots, only even order image works correctly
What is the expected behaviour
All images work correctly
Other relevant information
Bug does still occur when all/other plugins are disabled?
Your OS: Windows_NT 10.0.19041 win32 x64
Node.js version: 16.1.0
npm/yarn version: 7.11.2
Browser version: Version 91.0.4472.114 (Official Build) (64-bit)
Docsify version: 4.12.1
Docsify plugins: None, I create a project without any plugins the problem still happens.
The text was updated successfully, but these errors were encountered:
Joaxin
changed the title
Writing image caption plugins, but only even image works
I am writing a plugin that support image caption, but when it serves with docsify, only even order image works correctly
Jul 21, 2021
Bug Report
Steps to reproduce
The key code is here
What is current behaviour
See screenshots, only even order image works correctly

What is the expected behaviour
All images work correctly
Other relevant information
Bug does still occur when all/other plugins are disabled?
Your OS: Windows_NT 10.0.19041 win32 x64
Node.js version: 16.1.0
npm/yarn version: 7.11.2
Browser version: Version 91.0.4472.114 (Official Build) (64-bit)
Docsify version: 4.12.1
Docsify plugins: None, I create a project without any plugins the problem still happens.
The text was updated successfully, but these errors were encountered: