tuchk4/storybook-readme

Feature request: support more languages/flexibility for code blocks.

Open

#200 建立於 2019年7月22日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)JavaScript (541 star) (259 fork)batch import
help wanted

描述

Hi, First of all, I'd like to say thanks and great work on this project, I've found it very useful. But I've run into an issue where it'd be nice if more languages were supported for code blocks. I found that if I specify a .md code block with scss then the syntax is not recognized and styled correctly.

Issue/Background: Specifically the reason why I'm raising this issue is that I am writing scss and have stylelint for my project so it recognizes the scss within the .md files, but the outputted code block is unstyled when presented in the storybook-readme panel which makes it less readable.

So at this point I end up with either a very difficult to read code block in the addon, or if I specify my code blocks as css, the code block is instead incorrectly styled for comments and stylelint complains about my single line comments which are valid in scss but not valid with plain css.

Suggestion: It would be nice to be able to extend the styles with a local css/scss/js file, alternatively add support for more languages by default in the prismCodeTheme style files for example for jsx, scss.

貢獻者指南