Open joeldrapper opened 12 years ago
This should be doable.
The sassdoc parser just outputs a JSON object representing your documentation.
The viewer is then just Dust templates that consume that JSON object.
So there are two places we could implement Markdown: at the parser level, or at the viewer level. Not sure which is more appropriate. I'm inclined to say in the viewer, keeping the JSON object pure and exportable. We could use something like Showdown on the JS side with the viewer.
For now, you can use the @usage
block, it's just not formatted with Markdwn support... yet :)
// calculate the width of a grid block
// @function _getGridWidth
// ...
// @usage:
// _getGridWidth(10) => the width of 10 columns
// _getGridWidth(1/3, $of: 8) => the width of 1/3 of 8 columns
// _getGridWidth(5, $indent: (10px 0px)) => subtracts the $indent from the total width
Markdown support is definitely something I've been wanting myself too.
I see. I thought that block was for the code block. Though I guess code blocks could be defined with markdown syntax.
Would love to be able to write longer descriptions with markdown and various usage examples embedded with. Not sure how this would look.