在链接前后添加 2 个波浪号不会将其划掉

如果我有一个链接,比如指向这个帖子的链接:https://meta.discourse.org/t/horizon-theme/360486,我不能在它前后加上两个 ~ 来创建删除线。

正常:

~~this is cancelled~~

变成:
this is cancelled


链接:

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

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

问题在于末尾的 ~~ 没有与链接分开。很难判断它们是链接的一部分还是格式化的一部分。

__https://meta.discourse.org/t/horizon-theme/360486/1__ 也不起作用 __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

3 个赞

这不是一个错误。你需要使用尖括号来防止内联链接被解析,像这样:

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

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

3 个赞

哇,呃……2 个解决方案 :eyes:?感谢 @moin@lilly。问题已解决。

3 个赞