1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-14 04:34:21 +02:00

Update chunk.js

This commit is contained in:
Mike Kamermans
2017-04-14 08:29:58 -07:00
committed by GitHub
parent 667fbfae0b
commit 2aa657fe9e

View File

@@ -1,7 +1,21 @@
/** /**
* fix the stupid nonsense inability for markdown parsers to see link *
* syntax with `)` in the links themselves. * This file defines all the chunking functions that can be used to take
* a source markdown file, and then chop it up into blocks that should
* either be converted as markdown, or should be left alone.
*
* Getting a final HTML file using this entirely not-optimized solution
* simply involves calling:
*
* const convert = require(some markdown converter)
* const chunk = require(this file)
* const html = chunk(markdown).map(c => c.convert ? convert(c.data) : c.data).join('\n')
*
* And you're done.
*
*/ */
// fix the stupid nonsense inability for markdown parsers to see link
// syntax with `)` in the links themselves
function fixMarkDownLinks(data, chunks, chunkMore) { function fixMarkDownLinks(data, chunks, chunkMore) {
var next = chunkMore ? chunkMore[0] : false, var next = chunkMore ? chunkMore[0] : false,
otherChunkers = chunkMore ? chunkMore.slice(1) : false, otherChunkers = chunkMore ? chunkMore.slice(1) : false,