Skip to content

markdown preview wrongly creates links #136198

@4015-al

Description

@4015-al

Versions info

  • VS Code Version: 1.61.2
  • OS Version: Ubuntu 20.04.2 LTS

Related issues

#81891 (cloased)
#59999 (cloased)

Steps to Reproduce:

  1. Edit a markdown file with following content:
    hello.py
    hello.name
    
  2. Open markdown preview

the entries are displayed as an html links

Does this issue occur when all extensions are disabled?

Yes

Source of the issue

  • VS Code use markdown-it which use linkify-it to display the links preview.
  • in linkify-it fuzzyLink option - used to recognize URL-s without http(s):// head - has a default value of true.

Possible solution

Set fuzzyLink to false, using markdown-it linkfy function as follow:

md.linkify.set({ fuzzyLink: false });  // disables converting URL without http(s):// head  to link

as explained here. But, I don't know where should I add this code snippet, nor how to edit Markdown-it rendering options in VS Code,

Thank you.


Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugfeature-requestRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code InsidersmarkdownMarkdown support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)verifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions