winstromming / sassdown

Generates styleguides from Markdown comments in CSS, SASS and LESS files using Handlebars
253 stars 22 forks source link

Rendering code blocks #56

Closed vinayraghu closed 10 years ago

vinayraghu commented 10 years ago

First of all, thanks for this awesome plugin. It's everything I wanted. I have a question and maybe they are already solved but I'll ask anyway

  1. How do you render code blocks AND have them show up as code? In my SCSS, I have the ocde to create badges like below. Currently, only the code is showing up. However, I'd like to also render this html so that the badges show up with different variations. Is this possible by editing the template?
    <span class="badge.badge-primary">
    <span class="badge.badge-secondary">
    <span class="badge.badge-alert">
    <span class="badge.badge-info">
    <span class="badge.badge-success">
    <span class="badge.badge-warning">
winstromming commented 10 years ago

You can fence code blocks (Github-style) and they will render as both result and code example. For structure information: https://github.com/nopr/sassdown/issues/12#issuecomment-28219982

vinayraghu commented 10 years ago

Worked like a charm :)

winstromming commented 10 years ago

Happy to hear :D