I noticed this solution does not work any longer. It was the first thing I tried before googling and finding this post. I’ll keep looking for a solution. Surprisingly, even www.example.com is converted into a hyperlink if on the same line as a regular link.
Looks like I’ll be using www<span>.</span>example<span>.</span>com
www.example.com
Preformatted text has other meanings. I reject the premise in the first post, it reads like “how can I avoid hitting myself if I really like hitting myself?”
I just want to be able to type out a domain name as text (without formatting/styling) and have enough OCD not only go to length of using <span>.</span>, but also to spend time finding out why \. doesn’t work as expected and post about it.
Fortunately, not everyone is cursed with my level of OCD.
Zero width Unicode spacers would also work but anyone who copies and pastes that URL is in for a surprise.. and not the good kind! Dunno if @sam has any other ideas but the request is really odd.
We had a similar request with complaints about m.sc being autolinked.
I do wonder if we should side with @Vitaly here and disable linkify fuzzy out of the box. Cause https://cnn.com will continue to work even if linkify fuzzy is disabled. So all you do is lose out on www.cnn.com
I think we should probably amend the test here to have a simpler bypass for fuzzy, just not sure what it would be
Well, using ` does turn the text into a <code></code> section instead of <pre></pre> which is preformatted text.
@notriddle Technically speaking there is a difference, but there really is no reason why <code></code> can’t be acceptable – URL’s are a form of “code” afterall.
Well said. The few cases where it has come up for me are when I’m trying to point someone to one url instead of another – i.e., when I’m trying to de-emphasize a URL. For example:
A: Just use smile.amazon.com instead of amazon.com and select OpenMRS, Inc. as your charity.
B: Just use smile.amazon.com instead of amazon.com and select OpenMRS, Inc. as your charity.
B is certainly a reasonable workaround; personally I prefer A. But, this is such an embarrassingly small issue, I can’t justify anyone (including myself) spending time on it. I’ve got amazon<span>.</span>com as a workaround for the 1-2 times I’ll ever need this again, so I’m happy… clearly afflicted with too much focus on meaningless details… but happy.
The awesome folks working on Discourse have more important things to do. I recommend focusing on other ways to continue making Discourse the most awesome forum software in the world and let this thread fade away. I’m sure I’ll re-discover this thread in a few years when this comes up again, so won’t need to post about it ever again.
(and I promise to not suggest a Discourse GSoC project to add support for www\.example\.com)
우리 포럼의 주요 목적은 Alarm.com이라는 회사에 대해 이야기하는 것이기 때문에, 회원들이 게시글에 Alarm.com을 자주 언급합니다. 아마도 전체 토론 주제의 50% 정도에서 그렇게 될 것입니다. 결과적으로 Alarm.com으로의 링크가 의도치 않게 매우 많이 생성될 것입니다.
linkify 기능을 완전히 비활성화해 보았지만, 그렇게 하면 사람들이 URL을 한 줄로만 입력하여 onebox를 생성할 수 없게 되어 더 큰 문제가 발생합니다.
이 문제를 피하면서도 전체 URL은 linkify할 수 있도록 linkify fuzzy 기능을 비활성화할 수 있는 방법이 있으면 좋겠습니다. 가능한가요?
추가로 말씀드리자면… Sam이 제안한 대로 vendor/assets/javascripts/markdown-it.js의 defaultOptions에서 fuzzyLink를 false로 변경하면 제 문제가 해결되는 것 같습니다. 하지만 이렇게 하면 매번 업데이트할 때마다 해당 변경 사항을 수동으로 다시 적용해야 하므로 큰 부담이 됩니다.
그런데 더 간단한 해결책을 찾았습니다. markdown linkify tlds 설정은 퍼지 링크(fuzzy linking)가 URL로 간주하는 최상위 도메인(TLD) 목록입니다. 이 목록에서 모든 실제 TLD를 제거하고, 게시글에 절대 등장하지 않을 가짜 TLD 하나만 추가하면 fuzzyLink를 사실상 비활성화할 수 있습니다. 목록에 TLD가 하나 이상 있어야 하며, 그렇지 않으면 마침표(.)로 끝나는 모든 것이 링크로 처리되는 것으로 보입니다.
따라서 코드 변경 없이, 설정에서 실제 TLD를 제거하고 가짜 TLD를 추가함으로써 fuzzyLink를 비활성화할 수 있습니다.
저희 사이트는 Auto linkify words 컴포넌트 테마에 SWI-Prolog가 추가되어 있습니다.
SWI-Prolog가 링크로 변환되는 것, 예를 들어 SWI-Prolog, 그리고 코드 섹션으로 표시되는 것, 예를 들어 SWI-Prolog를 방지하기 위해 텍스트 중간에 <span></span>을 추가하면, 예를 들어 SWI<span></span>-Prolog, Auto linkify words에 의해 텍스트가 인식되지 않습니다. 또한 <span></span>은 브라우저에서 표시되지 않는 것으로 렌더링되므로, 특정 사례, 예를 들어 SWI-Prolog에 대해 필요한 대로 작동합니다.