github-markdown-toc icon indicating copy to clipboard operation
github-markdown-toc copied to clipboard

Fixed an issue in which the file path containing spaces could not be grepped

Open ZeroOnePro opened this issue 3 years ago • 3 comments

When running a script on path "/home/foo bar/test.md", there was a problem that the file path was not grep properly like this

grep ./home/foo/: No such file or directory grep bar: No such file or directory grep name: No such file or directory grep test.md No such file or directory

So I solved the problem by adding a comma to $gh_src

ZeroOnePro avatar Jun 11 '22 07:06 ZeroOnePro

Thanks for the fix! Could you, please, add some test for this case.

ekalinin avatar Jul 16 '22 16:07 ekalinin

I forgot about the test. added it please check thanks a lot

ZeroOnePro avatar Jul 17 '22 07:07 ZeroOnePro

There was a problem when using it with the insert flag, but the test did not reflect it, so I modified it

ZeroOnePro avatar Jul 17 '22 07:07 ZeroOnePro