-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image resize in % doesn't work anymore #1115
Comments
I think this #1065 might fix the height issue. could you try |
yep, I think it is the regex issues. ...
.replace(/(?:^|\s):([\w-]+:?)=?([\w-]+)?/g, (m, key, value) => { the .replace(/(?:^|\s):([\w-]+:?)=?([\w-%]+)?/ |
@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, |
yea, I m working on it. 🔨 |
[fix #1115] Image resize in % doesn't work.
Thanks for the quick fix here, @Koooooo-7. And @anikethsaha for reviewing. You guys rock! |
so great! |
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 thetitle
attribute:What is the expected behaviour
Other relevant information
Could this be a parsing mardown issue? Perhaps here: https://github.com/docsifyjs/docsify/blob/master/src/core/render/utils.js#L6-L14 ?
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:
Please create a reproducible sandbox
Mention the docsify version in which this bug was not present (if any)
The text was updated successfully, but these errors were encountered: