-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Remove baseUrl if its just a slash #1513
Conversation
I was just looking at the code and it looks like the issue is that Lines 1435 to 1436 in 124c576
I'm not sure if that was the intention when @styfle Instead of creating a special case for We should create a test file like relative_urls.md with |
The docs say |
So the ultimate questions is should we update I'm not exactly sure why |
I think typically baseUrl should be available - and works just as |
I think it works more like
|
I'm starting to think Just like the Or is this a job for the Renderer? |
I think it should be a job for the renderer. I'm not exactly sure why this option was added in the first place. It was added by @joshbruce in e5b2998 without a good explanation |
@joshbruce Can we remove this |
@styfle remove it at all? So is there a way to prepend some url to all urls which are transformed by marked? Or it will be via overriding Renderer.image && link? |
I don't think we will remove it since there are definitely people using it but this is one option we will be deprecating in the future and probably have an extension that overrides the renderer. |
I feel like in the meantime we should make |
@UziTech baseUrl: 'http://example.com/root' result: http://example.com/pic/img.jpg (without So what should we do in this case? Because we might break something |
the baseUrl needs to end with a slash marked("![](pic/img.jpg)", {baseUrl: "http://example.com/root/"});
// <p><img src="https://example.com/root/pic/img.jpg" alt=""></p> |
Marked version: master
Description
Contributor
Committer
In most cases, this should be a different person than the contributor.