question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

type detection broken in markdown file (.md)

See original GitHub issue

since markdown is supported in prettier there seems to be a problem in the type detection

when in setting.json:

"editor.formatOnSave": true

it seems that prettier is formatting the .md like typescript or javascript.

the three backticks are moved up inside the source code, which is an indicator for me, that prettier thinks its a javascript file.

my workaround at the moment is

"[markdown]": {
    "editor.formatOnSave": false
  }

but i really would like to use that feature for markdowns.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
trongthanhcommented, Dec 27, 2017

Looks like this plugin is not working for current VSCode 1.19.1 + prettier-vscode 1.0 + prettier 1.9.2.

It seems that prettier is assuming .md files as JavaScript and throwing syntax errors in output. For e.g.:

Unexpected token, expected ";" (/Users/**/README.md:1:5)
> 1 | NAU JUKEBOX
    |     ^
  2 | ===========
0reactions
github-actions[bot]commented, Apr 12, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Broken Markdown link detection should also work for internal ...
One fantastic feature of Docusaurus 2 is that it warns me if I have a broken link in one of my Markdown files:...
Read more >
Check links in your Markdown documents - Gleb Bahmutov
Check links in your Markdown documents. How to never have a wrong link in your README and other Markdown files.
Read more >
GitHub markdown not rendering and git detecting changes ...
Very frequently when I type in headings such as # heading or ## sub-heading , the heading does not render correctly. Here is...
Read more >
Markdown links to .md file open the source instead of ... - GitLab
Summary. When inserting a link to a .md file, for example link, clicking on it will open the source code, instead of opening...
Read more >
Markdown editing with Visual Studio Code
Markdown preview. VS Code supports Markdown files out of the box. You just start writing Markdown text, save the file with the .md...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found