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

No language registration for CSS #772

Closed
3 tasks done
fwqaaq opened this issue Jun 11, 2022 · 4 comments
Closed
3 tasks done

No language registration for CSS #772

fwqaaq opened this issue Jun 11, 2022 · 4 comments
Labels
bug: pending triage Maybe a bug, waiting for confirmation

Comments

@fwqaaq
Copy link

fwqaaq commented Jun 11, 2022

Describe the bug

If the css logo of my css code block is uppercase (CSS) like the following

```CSS
p{}
```

  • When building it produces an error like this:[vitepress] No language registration for CSS

Reproduction

pnpm build-->cause an error,
pnpm dev-->and the preview also creates problems

Expected behavior

Case insensitive on code block identifiers

System Info

[vite] Internal server error: No language registration for CSS
  Plugin: vitepress
  File: E:/Project/CSS/blog-css/docs/css布局/grid.md
      at getGrammar (E:\Project\CSS\blog-css\node_modules\.pnpm\shiki@0.10.1\node_modules\shiki\dist\index.js:2175:19)
      at codeToThemedTokens (E:\Project\CSS\blog-css\node_modules\.pnpm\shiki@0.10.1\node_modules\shiki\dist\index.js:2184:30)
      at Object.codeToHtml (E:\Project\CSS\blog-css\node_modules\.pnpm\shiki@0.10.1\node_modules\shiki\dist\index.js:2201:24)
      at Object.highlight (file:///E:/Project/CSS/blog-css/node_modules/.pnpm/vitepress@1.0.0-alpha.1/node_modules/vitepress/dist/node/serve-e8d58be3.js:31999:26)    
      at default_rules.fence (file:///E:/Project/CSS/blog-css/node_modules/.pnpm/vitepress@1.0.0-alpha.1/node_modules/vitepress/dist/node/serve-e8d58be3.js:25746:27) 
      at md.renderer.rules.fence (file:///E:/Project/CSS/blog-css/node_modules/.pnpm/vitepress@1.0.0-alpha.1/node_modules/vitepress/dist/node/serve-e8d58be3.js:32339:16)
      at md.renderer.rules.fence (file:///E:/Project/CSS/blog-css/node_modules/.pnpm/vitepress@1.0.0-alpha.1/node_modules/vitepress/dist/node/serve-e8d58be3.js:32828:21)
      at Object.md.renderer.rules.fence (file:///E:/Project/CSS/blog-css/node_modules/.pnpm/vitepress@1.0.0-alpha.1/node_modules/vitepress/dist/node/serve-e8d58be3.js:32803:12)
      at Renderer$1.render (file:///E:/Project/CSS/blog-css/node_modules/.pnpm/vitepress@1.0.0-alpha.1/node_modules/vitepress/dist/node/serve-e8d58be3.js:26025:38)   
      at MarkdownIt.render (file:///E:/Project/CSS/blog-css/node_modules/.pnpm/vitepress@1.0.0-alpha.1/node_modules/vitepress/dist/node/serve-e8d58be3.js:31950:24)

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@fwqaaq fwqaaq added the bug: pending triage Maybe a bug, waiting for confirmation label Jun 11, 2022
@brc-dd
Copy link
Member

brc-dd commented Jun 11, 2022

It should be in lowercase always.

@brc-dd brc-dd closed this as not planned Won't fix, can't repro, duplicate, stale Jun 11, 2022
@fwqaaq
Copy link
Author

fwqaaq commented Jun 11, 2022

It should be in lowercase always.

😯,but compatible uppercase will have better support

@brc-dd
Copy link
Member

brc-dd commented Jun 11, 2022

But it will be non-standard too. Most of the tools don't support this. Say for example if you write CSS there instead of css and format your code with Prettier, then it won't apply CSS formatting to the code block's contents.

@fwqaaq
Copy link
Author

fwqaaq commented Jun 11, 2022

Well, then I will provide support myself. Vuepress has no problem in this regard though

brc-dd added a commit that referenced this issue Jul 28, 2022
fixes #772

Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: pending triage Maybe a bug, waiting for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants