Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformatting does not work on .mdx files #3551

Open
Signum opened this issue Oct 20, 2024 · 1 comment
Open

Reformatting does not work on .mdx files #3551

Signum opened this issue Oct 20, 2024 · 1 comment

Comments

@Signum
Copy link

Signum commented Oct 20, 2024

Summary

Prettier manages to reformat all kinds of files. ".mdx" files however are not formatted.

Github Repository to Reproduce Issue

https://github.com/Signum/prettier-mdx-debug

Steps To Reproduce:

  1. Have the "prettier" extension installed in vscode
  2. Open the index.mdx file in vscode
  3. Press Ctrl+Shift+P
  4. Choose "Format Document"

Expected result

The frontmatter/YAML part should be rewrapped to 120 columns:

hero:
  tagline:
    ISPmail is a free but extensive do-it-yourself guide to help you build a fully-functional mail server from 100%
    open-source components. It is based on Debian GNU/Linux. Light enough for your friends and family. Or powerful
    enough for professional use.

Actual result

The file is not reformatted.

hero:
  tagline:
    ISPmail is a free but extensive do-it-yourself guide to help you build a fully-functional mail server from 100% open-source components. It is based on Debian GNU/Linux. Light enough for your friends and family. Or powerful enough for professional use.

Additional information

VS Code Version: 1.94.2

Prettier Extension Version: v11.0.0

OS and version: Linux Mint 21.3

Hint: When installing prettier with "pnpm install prettier" and running "npx prettier index.mdx" the file gets reformatted properly.

Prettier Log Output

["DEBUG" - 00:00:17] Using bundled version of prettier.
@Signum
Copy link
Author

Signum commented Oct 21, 2024

My list of installed extensions (in case the "mdx" extension could interfere for example):

  • adrientoub.base64utils
  • aki77.rails-db-schema
  • alefragnani.bookmarks
  • alefragnani.project-manager
  • aliariff.vscode-erb-beautify
  • anbuselvanrocky.bootstrap5-vscode
  • astro-build.astro-vscode
  • bierner.markdown-mermaid
  • bpruitt-goddard.mermaid-markdown-syntax-highlighting
  • bradlc.vscode-tailwindcss
  • bung87.rails
  • bung87.vscode-gemfile
  • castwide.solargraph
  • chrislajoie.vscode-modelines
  • christian-kohler.path-intellisense
  • cschlosser.doxdocgen
  • eamodio.gitlens
  • esbenp.prettier-vscode
  • etsi0.class-collapse
  • github.github-vscode-theme
  • golang.go
  • hridoy.rails-snippets
  • jeff-hykin.better-cpp-syntax
  • jumpinjackie.vscode-map-preview
  • kaiwood.endwise
  • keno.uikit-3-snippets
  • koichisasada.vscode-rdbg
  • lextudio.restructuredtext
  • makicamel.rails-routes-navigator
  • meezilla.json
  • moalamri.inline-fold
  • ms-azuretools.vscode-docker
  • ms-kubernetes-tools.vscode-kubernetes-tools
  • ms-python.debugpy
  • ms-python.isort
  • ms-python.python
  • ms-python.vscode-pylance
  • ms-toolsai.jupyter
  • ms-toolsai.jupyter-keymap
  • ms-toolsai.jupyter-renderers
  • ms-toolsai.vscode-jupyter-cell-tags
  • ms-toolsai.vscode-jupyter-slideshow
  • ms-vscode-remote.remote-containers
  • ms-vscode-remote.remote-ssh
  • ms-vscode-remote.remote-ssh-edit
  • ms-vscode-remote.remote-wsl
  • ms-vscode.cmake-tools
  • ms-vscode.cpptools
  • ms-vscode.cpptools-extension-pack
  • ms-vscode.cpptools-themes
  • ms-vscode.remote-explorer
  • ms-vscode.vscode-serial-monitor
  • mtayllan.ruby-run-tests
  • mushan.vscode-paste-image
  • ninoseki.vscode-mogami
  • orepor.color-tabs-vscode-ext
  • pkief.material-icon-theme
  • platformio.platformio-ide
  • rangav.vscode-thunder-client
  • redhat.vscode-commons
  • redhat.vscode-yaml
  • reliutg.bulma-css-class-completion
  • samuelcolvin.jinjahtml
  • shanehofstetter.rails-open-partial
  • shopify.ruby-lsp
  • sianglim.slim
  • sirtori.indenticator
  • svelte.svelte-vscode
  • twxs.cmake
  • unifiedjs.vscode-mdx
  • wangxinhai-ref-chunsen.flutter-code-select
  • yzhang.markdown-all-in-one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant