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 ignore single-line comments correctly #60

Open
LucunJi opened this issue Apr 29, 2021 · 0 comments
Open

Cannot ignore single-line comments correctly #60

LucunJi opened this issue Apr 29, 2021 · 0 comments

Comments

@LucunJi
Copy link

LucunJi commented Apr 29, 2021

Environment

  • Ubuntu Linux focal
  • hexo-renderer-stylus@2.0.1
  • hexo@5.4.0
  • hexo-theme-next@8.3.0

Gemini scheme in NexT theme is used.

Description

I was editing sources/_data/mixins.styl to prettify my site. The original values were copied from the source as a reference.

When I use single line comments, the page glitches. The white background of posts and sidebar disappears, but the exact glitch behavior may change depends on what is commented in which file. The comments do not appear in main.css after hexo clean && hexo build

//original values:
// desktop() {
//  @media (min-width: 992px) {
//    {block};
//  }
//}

But when I use block comments, the page is rendered correctly. After clean and build, the comments appear in the beginning of main.css.

/*original values:
 desktop() {
  @media (min-width: 992px) {
    {block};
  }
}
 */

I looked into documents of stylus and it says line comments is allowed, thus I think the renderer went into error.

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