Adding 2 tildes before & after link does not strike it out

AI-generated summary

In a support discussion regarding Markdown formatting, NateDhaliwal reported that applying strikethrough syntax (~~) directly to a raw URL does not work as expected. Moin explained that the parser struggles to distinguish the closing tildes from the link itself, noting that underscores also fail in this context. Moin suggested workarounds, such as wrapping the URL in a markdown link before striking it out (~~[Text](URL)~~) or using legacy HTML tags like [s] or <s>. Alternatively, Lilly clarified that this is not a bug and proposed using angle brackets to prevent the URL from auto-linking before applying the strikethrough: ~~<URL>~~. NateDhaliwal confirmed that these solutions resolved the issue.

If I have a link, say to this post: Horizon Theme, I cannot put 2 ~ before and after to create a strikethrough.

Normal:

~~this is cancelled~~

Becomes:
this is cancelled


Link:

~~https://meta.discourse.org/t/horizon-theme/360486/1~~

Becomes:
~~https://meta.discourse.org/t/horizon-theme/360486/1~~

The problem is that the ~~ at the end are not separated from the link. It may be difficult to decide if they are part of the link or part of formatting.

__https://meta.discourse.org/t/horizon-theme/360486/1__ doesn’t work either __https://meta.discourse.org/t/horizon-theme/360486/1__

You can use one of these instead

~~[Horizon Theme](https://meta.discourse.org/t/horizon-theme/360486/1)~~
[s]https://meta.discourse.org/t/horizon-theme/360486/1 [/s]
<s>https://meta.discourse.org/t/horizon-theme/360486/1 </s>

Horizon Theme
Horizon Theme
Horizon Theme

it’s not a bug. you need to use the angle brackets to make the inline link not resolve, like this:

~~<https://meta.discourse.org/t/horizon-theme/360486/1>~~

https://meta.discourse.org/t/horizon-theme/360486/1

Wow, uhh… 2 solutions :eyes:? Thanks @moin and @lilly. Problem solved.