How do I stop a url being converted to a markdown link

Hello, I’m a new user. How do I stop a URL, or part of a URL, that I’ve typed in being converted to a markdown links?

I pasted this in, with backticks on the lines above and below

invoke-restmethod https://micro.blog/micropub?mp-destination=https://mattypenny-test.micro.blog

and it was getting converted to something like

invoke-restmethod https://micro.blog/micropub?mp-destination=[mattypenny-test.micro.blog](https://mattypenny-test.micro.blog)

I might be doing something daft…but I can’t see it atm

Micro.blog turns URLs into Markdown links except when the URL is inside a code block, so it shouldn’t be doing it in this case. I just did a quick test with your example and it seems to be working for me. Do you mind sharing the full post text? I’m sure it’s a bug in Micro.blog but maybe there is something else that I’m missing.

Hi, sorry for the delay. The original text is as follows…I’ve edited it a bit but it does reproduce the error:

Sorry about the formatting of this post…I’m having trouble getting markdown not to convert the url to markdown links, even within code blocks

There’s a bit more detail on posting generally from powershell at mattypenny.micro.blog/2024/02/1…

This is the standard bit


$Token = 'whatever-the-token-is' | ConvertTo-SecureString -AsPlainText -Force

$Body = @{ content = 'Testing again. 1 , 2, 1, 2' h = 'entry' 'post-status' = 'draft' }

You then put ‘?mp-destination=’ followed by the URL of the test micro.blog on the end of the base URL as in the gist below. (The markdown conversion is nausing up the URL if I type it in here - sorry!


invoke-restmethod https://micro.blog/micropub?mp-destination=https://mattypenny-test.micro.blog -Method post  -Authentication Bearer -Token $Token -Body $Body

url                                                              preview                                                 edit
---                                                              -------                                                 ----
https://mattypenny-test.micro.blog/2024/02/18/testing-again.html https://micro.blog/account/posts/143155/preview/3875601 https://micro.blog/account/posts/143155/edit/3875601

Then when I’ve posted it, it renders as the below. I could well be doing something daft…I was trying to post it at about 3 in the morning, and possibly since then I just can’t see what it is that I got wrong

This is the standard bit


$Token = 'whatever-the-token-is' | ConvertTo-SecureString -AsPlainText -Force

$Body = @{ content = 'Testing again. 1 , 2, 1, 2' h = 'entry' 'post-status' = 'draft' }

You then put ‘?mp-destination=’ followed by the URL of the test micro.blog on the end of the base URL as in the gist below. (The markdown conversion is nausing up the URL if I type it in here - sorry!


invoke-restmethod [micro.blog/micropub](https://micro.blog/micropub?mp-destination=https://mattypenny-test.micro.blog) -Method post  -Authentication Bearer -Token $Token -Body $Body

url                                                              preview                                                 edit
---                                                              -------                                                 ----
[mattypenny-test.micro.blog/2024/02/1...](https://mattypenny-test.micro.blog/2024/02/18/testing-again.html) [micro.blog/account/p...](https://micro.blog/account/posts/143155/preview/3875601) [micro.blog/account/p...](https://micro.blog/account/posts/143155/edit/3875601)

It’s on the test blog, in case that helps: https://mattypenny-test.micro.blog

Hey there. Just ran into the same problem, as I was to use justified-swipe box. I am unable to use pasted links of uploaded images, they’re all turned into markdown links after saving the post. For the record: I used the code snipped from GitHub to create a gallery and I changed the urls to the images. Is there any chance the transformation of urls can be prevented?

Sorry, this was a bug. I just fixed it, although you will need to edit any posts to remove the Markdown link that were already processed incorrectly.

Let me know if you see any problems still.

Thank you - that’s great!