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

Syntax highlight error for comments #7

Closed
archangel-irk opened this issue Sep 28, 2020 · 1 comment
Closed

Syntax highlight error for comments #7

archangel-irk opened this issue Sep 28, 2020 · 1 comment

Comments

@archangel-irk
Copy link

Hello guys, thank you for this amazing plugin!
I found a problem with comments and highlights for them. See a screenshot below.

image

Source:

<!--<Meta
  title="Button"
  component={Button}
  argTypes={{
    disabled: {
      name: 'disabled',
      description: 'Disabled state of button',
      defaultValue: false,
      type: 'boolean',
      control: 'boolean',
    },
  }}
/>

<!-- https://github.com/storybookjs/storybook/issues/11542 -->
<!-- https://github.com/storybookjs/storybook/issues/11813 -->

<!-- export const Template = (args) => <Button {...args} style={{ marginRight: 'var(--fr-size-xs)' }} />; -->

<!-- How to write styles
<style>{`
  .subheading {
    --mediumdark: '#999999';
    font-weight: 900;
    font-size: 13px;
  }
`}</style>
-->

I found that this syntax <!--I'm a comment--> will be removed in favor of {/*I'm a comment*/}, but I think it's good to support both.
mdx-js/mdx#1039

@anstarovoyt
Copy link
Collaborator

fixed the MDX part (so no any errors now). Unfortunately "proper" comments-like highlighting should be implemented on the markdown plugin side.

The fix is available only for the upcoming 2020.3. If it is a big issue for you, please let me know. I will try to backport the fix to 2020.2.

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