## Bug Report We're following the docsify documentation, which states that it's possible to resize an image using a percentage: https://github.com/docsifyjs/docsify/blob/develop/docs/helpers.md#resizing #### Steps to reproduce Use markdown to insert an image, with 50% width: ```  ``` #### What is current behaviour Notice the `width` is wrong. Instead of 50% it's just 50. Also the `%` seems to somehow be transferred to the `title` attribute: ``` <img src="/upstream-protocol/sample-app/_media/diagrams/sample_upstream_flow.png" alt="My diagram" title="%" width="50" height="50"> ``` #### What is the expected behaviour ``` <img src="/upstream-protocol/sample-app/_media/diagrams/sample_upstream_flow.png" alt="My diagram" width="50%"> ``` #### Other relevant information <img width="1075" alt="Screenshot 2020-04-13 16 18 11" src="https://user-images.githubusercontent.com/952836/79123253-67ed4b80-7da2-11ea-81c5-47c07e00cca3.png"> Could this be a parsing mardown issue? Perhaps here: https://github.com/docsifyjs/docsify/blob/master/src/core/render/utils.js#L6-L14 ? <!-- (Update "[ ]" to "[x]" to check a box) --> - [x] Bug does still occur when all/other plugins are disabled? - Your OS: - Node.js version: - npm/yarn version: - Browser version: - Docsify version: 4.11.3 - Docsify plugins: <!-- Love docsify? Please consider supporting our collective: 👉 https://opencollective.com/docsify/donate --> #### Please create a reproducible sandbox [](https://codesandbox.io/s/307qqv236) #### Mention the docsify version in which this bug was not present (if any)
Activity
costimuraru commentedon Apr 13, 2020
CC @anikethsaha, @QingWei-Li
anikethsaha commentedon Apr 13, 2020
I think this #1065 might fix the height issue.
And about the
%issue, I do think there might be some bug with the extractor.could you try
and check if the%issue still exists or not !Koooooo-7 commentedon Apr 13, 2020
yep, I think it is the regex issues.
the
([\w-]+)missed the%. and I checkedv4.11.0,v4.8.0,v4.6.8, both have this problem 😅.I fixed the regex
then, it works.

anikethsaha commentedon Apr 13, 2020
@Koooooo-7 thanks a lot for investigating this ( as always 😄 )
Can you submit a PR with the fix and also we need to check if it's breaking something else or not,
[fix #1115] Image resize in % doesn't work.
Koooooo-7 commentedon Apr 13, 2020
yea, I m working on it. 🔨
Merge pull request #1116 from docsifyjs/fix1115
costimuraru commentedon Apr 14, 2020
Thanks for the quick fix here, @Koooooo-7. And @anikethsaha for reviewing. You guys rock!
cugxuan commentedon May 25, 2020
so great!
waiting for new release!