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

@ cannot be the first character of a line inside a code snippet #100

Open
itscesarvillar opened this issue May 12, 2016 · 1 comment
Open

Comments

@itscesarvillar
Copy link

itscesarvillar commented May 12, 2016

Description

The character '@' cannot be the first character of a line inside a code snippet.

example:

```css
‌@media (max-width: 768px) {
  .hiddenOnSmallScreen {
    display: none !important;
  }
}
`` `

Expected outcome

the following text:
@media (max-width: 768px) {
.hiddenOnSmallScreen {
display: none !important;
}
}
coloured accordingly to the language.

Actual outcome

```css

Steps to reproduce

  1. Putting a '@' as the first character inside a snippet code in your component documentation.
  2. Enter in your web documentation.
  3. See that your code snippet is not there.

Browsers Affected

all browsers are affected

Workaround

You can skip this behaviour by putting the 'Zero-width non-joiner', (which is the following, embraced in brackets [ ]) before '@'.

@caranicas
Copy link

This isn't only an issue when it is the first line of a code block. I have a comment displaying how to use a custom style with the an @apply and @ breaks it.

My snippet

    <style is="custom-style">
      foo-component {
        @apply  --one-comp-basic-mixin;
      }
    </style>
    <foo-component></foo-component>

and all you see are the three backticks.

I was unfamiliar with the "Zero-width non-joiner" so I will look into it, but I had just added a tilda

~@apply  --one-comp-basic-mixin;

with a note, and then it displays properly.

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