straker / livingcss

Parse comments in your CSS to generate a living style guide using Markdown, Handlebars, Polymer, and Prism syntax highlighter.
MIT License
241 stars 21 forks source link

@ bug #57

Closed sprynm closed 6 years ago

sprynm commented 6 years ago

When I use something like

* @code {sass}
* @include myMixin(); 
* @include myMixin(option);  

I'm getting this

@include myMixin(); 
@include myMixin(option);  

Only the first @ is getting replaced with the @ symbol.

Any ideas?

straker commented 6 years ago

It would seem I forgot to use a global replace for that in the code https://github.com/straker/livingcss/blob/master/lib/tags.js#L261.

If that was changed to a simple regex with a global flag it should fix the problem

this.block.code.description = this.block.code.description.replace(/@/g, '@');
straker commented 6 years ago

fixed in v4.5.1