Skip to content
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 size instructions not working #42

Closed
timmkrause opened this issue May 18, 2018 · 5 comments
Closed

Image size instructions not working #42

timmkrause opened this issue May 18, 2018 · 5 comments

Comments

@timmkrause
Copy link

I am currently not sure if this is a standard, haven't done any research on that yet but our VSTS Wiki supports the following image resizing instruction:

![name](files/some-file.png =20%x)

This causes some "malicious" error during the check.
These instructions should be removed and then passed to the check I think.

@timmkrause
Copy link
Author

timmkrause commented May 23, 2018

Some background about the topic:

https://stackoverflow.com/questions/14675913/changing-image-size-in-markdown
https://blog.devmatter.com/change-image-size-in-vsts-wiki/

The error:

image

A potential replacement regex:

=\d*%?x\d*$

Regex with examples/tests (click "RUN TESTS" and expand them to see the details):

https://regex101.com/r/YF3Z3b/3/tests

@timmkrause timmkrause changed the title Support image links containing Markdowns image resize instructions Image size instructions not working May 23, 2018
@nschonni
Copy link
Contributor

Might be better to file for https://github.com/tcort/markdown-link-extractor since that pulls out the links. It in turn uses https://github.com/markedjs/marked for the parsing, so it may even need to go there

@timmkrause
Copy link
Author

Thanks for pointing this out. As I'd like to start with the glob feature, would you mind taking care of this? Or don't you have the capacity to do so?

@timmkrause
Copy link
Author

Because of weird debugging experiences (working here, not working there, WTF moments...) I found out that these kinds of image links were extracted by markdown-link-extractor until marked version 0.3.19.
So the hook in markdown-link-extractor to remove the instruction does not work anymore since version 0.4.0.
Because their goal is to align with the GFM/CommonMark standards I think they removed it intentionally.

markedjs/marked#1279

@tcort
Copy link
Owner

tcort commented May 30, 2018

I've published v3.5.4 which depends on the improved markdown-link-extractor. If this isn't solved, please re-open the issue.

@tcort tcort closed this as completed May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants