pattern-lab / styleguidekit-mustache-default

The default Mustache StyleguideKit provides the basic front-end assets when using the Mustache PatternEngine.
http://patternlab.io/
MIT License
1 stars 10 forks source link

Syntax highlighting for Pattern Descriptions (md) #1

Open EvanLovely opened 8 years ago

EvanLovely commented 8 years ago

In our pattern description files (markdown files), we'll use code blocks and it'd be great if the syntax highlighting hit it too! If someone could get it into this repo, I could get it into the twig one. Thanks! :beers:

bradfrost commented 8 years ago

That's a really good idea. Do you happen to know where syntax highlighting targeting is defined? I think @dmolsen would know for sure.

dmolsen commented 8 years ago

It's determined on a per panel basis. The contents of a panel need to get sent through Prism to get the highlighting. Info is no longer a panel so I guess I'll have to come up with another solution. If an example of a description that has code can be shared I'll figure out how to make it happen. I have an idea but I'd rather see an example before saying "this is the way".

On Aug 13, 2016, at 7:09 PM, Brad Frost notifications@github.com wrote:

That's a really good idea. Do you happen to know where syntax highlighting targeting is defined? I think @dmolsen would know for sure.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

EvanLovely commented 8 years ago

Here you go; this is an example of our colors.md file that's next to our colors.twig pattern:

Colors can be used like this:

```scss
.class {
  color: $color-orange;
}
onelonemonkey commented 5 years ago

I've attempted to do this too however any code highlighting is coming though drop shadowed and isn't readable although it does appear to be applying the highlighting. I've begun documenting json etc for my patterns and it's the following code causing the issues:

```json 

or

```javascript

I'm not sure if this is something being looked at as part of PL3?