Add docstring to parseMarkdown
parent
c6c446c82d
commit
b3d42a3677
5
index.js
5
index.js
|
@ -165,6 +165,11 @@ function getMediaFromDirectory(dir) {
|
|||
return mediaType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns a single markdown file into the json structure needed
|
||||
* @param {path} doc - a single file path to a markdown file
|
||||
* @returns {object} Json object of entries in the md file
|
||||
*/
|
||||
function parseMarkdown(doc) {
|
||||
let tree = remark.parse(doc).children;
|
||||
let sections = []; // This will go into root object later
|
||||
|
|
Loading…
Reference in New Issue