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

fix(markdown): escape when mode == 'md' #2971

Merged
merged 2 commits into from
Apr 3, 2022
Merged

fix(markdown): escape when mode == 'md' #2971

merged 2 commits into from
Apr 3, 2022

Conversation

JuanM04
Copy link
Contributor

@JuanM04 JuanM04 commented Apr 2, 2022

Changes

I've recently encountered this error when using mode: 'md':

 error   Transform failed with 1 error:
  /home/juanm04/dev/projects/portfolio/src/pages/docs/wsl-memory.md:34:164: ERROR: Expected "}" but found "distro"
  File:
    /home/juanm04/dev/projects/portfolio/src/pages/docs/wsl-memory.md
  Code:
      33 | Therefore, in your situation, all you need to include in your file is ⤵
      35 | ```ini:.wslconfig
      36 | [wsl2]
      37 | memory=1GB

It turned out, rehypeEscape was only being executed when mode was equal to mdx, so I've made it so it always get executed. (Plus, I've made some formatting so make it more clear what is being used with MDX and what don't)

Testing

Docs

@changeset-bot
Copy link

changeset-bot bot commented Apr 2, 2022

🦋 Changeset detected

Latest commit: 1b60752

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/markdown-remark Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the feat: markdown Related to Markdown (scope) label Apr 2, 2022
Copy link
Contributor

@tony-sull tony-sull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I like the formatting clean up you included here 👍

@JuanM04 JuanM04 merged commit ad3c391 into main Apr 3, 2022
@JuanM04 JuanM04 deleted the fix/md-escape branch April 3, 2022 17:32
@github-actions github-actions bot mentioned this pull request Apr 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: markdown Related to Markdown (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants