Skip to content

Commit

Permalink
fix: Properly handle files with whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperupcall committed Oct 12, 2023
1 parent 95715a3 commit c2f0fbb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions doctoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ var path = require('path')
function cleanPath(path) {
var homeExpanded = (path.indexOf('~') === 0) ? process.env.HOME + path.substr(1) : path;

// Escape all spaces
return homeExpanded.replace(/\s/g, '\\ ');
return homeExpanded;
}

function transformAndSave(files, mode, maxHeaderLevel, title, notitle, entryPrefix, processAll, stdOut, updateOnly) {
Expand Down

0 comments on commit c2f0fbb

Please sign in to comment.