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

Mermaid import tag shown at top of page (as plain text) #88

Closed
a3957273 opened this issue Feb 28, 2023 · 2 comments
Closed

Mermaid import tag shown at top of page (as plain text) #88

a3957273 opened this issue Feb 28, 2023 · 2 comments

Comments

@a3957273
Copy link

a3957273 commented Feb 28, 2023

Describe the bug
As of version 1.3.2 mdx-mermaid appears to show the import tag when using NextJS. This error does not occur on mdx-mermaid version 1.2.3.

To Reproduce

// next.config.js
import nextMDX from '@next/mdx'
import remarkMermaid from 'mdx-mermaid'


const withMDX = nextMDX({
  extension: /\.mdx?$/,
  options: {
    remarkPlugins: [remarkMermaid],
    rehypePlugins: [],
  },
})

export default withMDX({
    pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
})
// example.mdx
# Test header

Expected behavior
MDX import is not shown at top of screen.

Screenshots
Screenshot 2023-02-28 at 16 54 13

Tool chain used:
NextJS 12

@olayway
Copy link

olayway commented Jun 12, 2023

I'm having the same issue. @a3957273 have you found any solution or workaround?

@olayway
Copy link

olayway commented Jun 13, 2023

Prerelease v2.0.0-rc7 seems to fix the issue.

@sjwall sjwall closed this as completed Jul 9, 2023
aviator-app bot pushed a commit to alcionai/corso that referenced this issue Dec 27, 2023
This fixes an issue on the docs site where `import { Mermaid } from 'mdx-mermaid/lib/Mermaid';` shows up at the top
of the pages.

sjwall/mdx-mermaid#88 indicates updating to `2.0.0` fixes the issue

![image](https://github.com/alcionai/corso/assets/918191/7d6073e4-f6bb-458e-8647-0d5c965f3382)


---

#### Does this PR need a docs update or release note?

- [ ] ✅ Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x] ⛔ No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [x] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #<issue>

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ] ⚡ Unit test
- [ ] 💚 E2E
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

3 participants