Commit cf3a8226 authored by Armand PUCCETTI's avatar Armand PUCCETTI
Browse files

minor bug correction

parent 0e93e265
......@@ -41,12 +41,13 @@ function case1 (collection,val) {
}
function case2 (collection,val) {
val = common.normalise(val);
const norm_val = common.normalise(val);
const { exec } = require('child_process');
let out_val = val + '.json';
// let out_val = val + '.json';
console.log("val ",val);
let content = fs.readFileSync(val, 'utf8');
let res = md2json.parse (content);
var document = { "filename": val, "filecontent": res };
var document = { "filename": norm_val, "filecontent": res };
// Insert the content into the collection
collection.insertOne(document, function(err, res) {
if (err) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment