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

[Feature] Support preview based on configured file type rather than file extension #116

Open
moni-dips opened this issue Dec 1, 2023 · 4 comments

Comments

@moni-dips
Copy link

I create a new text file in Code, select type as Mermaid and open the mermaid preview.
Then I click inside the text file and paste some mermaid code.
As troubleshooting steps, I tried moving code to each of my three monitors, but nothing changed.

Expected behaviour

Preview works

sequenceDiagram
    Alice->>+John: Hello John, how are you?
    Alice->>+John: John, can you hear me?
    John-->>-Alice: Hi Alice, I can hear you!
    John-->>-Alice: I feel great!```

### Actual behaviour
Preview does not work

Include:
   * Screenshot ![image](https://github.com/vstirbu/vscode-mermaid-preview/assets/126574585/59ac9322-166b-4aad-a5d6-94bd91ae9f68)
   * Preview mode: Mermaid
   * Theme used: dark
Loading
@moni-dips
Copy link
Author

image

@vstirbu
Copy link
Collaborator

vstirbu commented Dec 1, 2023

The extensions is active for stand alone files with extension .mmd. It does not look like that is the case in the attached screenshot.

@moni-dips
Copy link
Author

I just created a new scratch file in code and selected the filetype as mermaid, there is no real file

@vstirbu
Copy link
Collaborator

vstirbu commented Dec 2, 2023

The extension works only with stand alone markdown .mmd files or markdown files with embedded diagrams as describe in the documentation.

Activating the extension based on the file type is not supported. I'll have to investigate how that works before adding that functionality.

@moni-dips moni-dips changed the title Preview does not work [Feature] Support preview based on configured file type rather than file extension Dec 4, 2023
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

2 participants