4 ms·
Forgive me if it's obvious, but I'm new to programming and I'm trying to understand how this works. I've been looking through the github repo for a while now a
by poptartman 9y ago
Forgive me if it's obvious, but I'm new to programming and I'm trying to understand how this works.
I've been looking through the github repo for a while now and I can't find the code that is responsible for parsing the markdown syntax into the html tags which are rendered on the page. Can someone point me to where that logic is occuring?
- grzm 9y agoCleaver uses the marked library for markdown processing. The conversion happens in renderSlide: https://github.com/jdan/cleaver/blob/master/lib/index.js#L274-L276 https://github.com/jdan/cleaver/blob/master/lib/index.js#L27... /** * Renders a slide. * * @param {string} content Markdown content to be rendered as a slide * @return {string} The formatted slide */ Cleaver.prototype.renderSlide = function (content) { return marked(content); };
- prezjordan 9y agogrzm covered it well! But let me know if you have any other questions or are generally curious about how the code is structured. I learned a lot myself while writing it. I'm @jdan on twitter if that's a better avenue for you (DMs are open)