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

Blog cannot handle italic at the beginning of the post #161

Open
derekchiang opened this issue May 11, 2024 · 0 comments
Open

Blog cannot handle italic at the beginning of the post #161

derekchiang opened this issue May 11, 2024 · 0 comments

Comments

@derekchiang
Copy link
Contributor

derekchiang commented May 11, 2024

Right now the blog crashes if you use italic markdown like *blah blah* at the beginning of a blog post.

Currently I'm working around this issue using HTML: https://github.com/zerodevapp/docs/blob/acf8364d75912f345648d114a6a0f1b39d279e5e/docs/pages/blog/4337-and-3074-disagreements.mdx?plain=1#L12C1-L15C6

If I replace the highlighted HTML with markdown like:

*blah blah*

Then the blog crashes with these error messages:

11:01:51 AM [vite] Pre-transform error: Cannot read properties of undefined (reading 'length')
11:01:51 AM [vite] Pre-transform error: Cannot read properties of undefined (reading 'length') (x2)
11:01:53 AM [vite] Error when evaluating SSR module /@fs/Users/derek/code/zerodev/docs/node_modules/vocs/_lib/app/components/BlogPosts.js: failed to import "virtual:blog"
|- TypeError: Cannot read properties of undefined (reading 'length')
    at Context.load (file:///Users/derek/code/zerodev/docs/node_modules/vocs/_lib/vite/vite.config.js.timestamp-1715439706999-8250bec8c8718.mjs:1843:27)
    at async Object.load (file:///Users/derek/code/zerodev/docs/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:64034:32)
    at async loadAndTransform (file:///Users/derek/code/zerodev/docs/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:49665:24)
    at async instantiateModule (file:///Users/derek/code/zerodev/docs/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:50759:10)

file:///Users/derek/code/zerodev/docs/node_modules/vocs/_lib/vite/vite.config.js.timestamp-1715439706999-8250bec8c8718.mjs:1843
          if (description.length > 200)
                          ^

TypeError: Cannot read properties of undefined (reading 'length')
    at Context.load (file:///Users/derek/code/zerodev/docs/node_modules/vocs/_lib/vite/vite.config.js.timestamp-1715439706999-8250bec8c8718.mjs:1843:27)
    at async Object.load (file:///Users/derek/code/zerodev/docs/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:64034:32)
    at async loadAndTransform (file:///Users/derek/code/zerodev/docs/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:49665:24)
    at async instantiateModule (file:///Users/derek/code/zerodev/docs/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:50759:10)

My workaround is not perfect because it breaks the preview: https://docs.zerodev.app/blog

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