Closed shutaozhenzhen closed 10 months ago
Don't exactly know what you are asking for here, so I'm going to close this for now.
Don't exactly know what you are asking for here, so I'm going to close this for now.
First, can pypandoc
fix this problem that using pypandoc with path like '[0].txt' need to add glob.escape
in code?
Second, if can't, I think this problem worth to be explained in pypandoc
's document, that if someone is dealing file like '[0].txt', they need to use glob.escape
, like output = pypandoc.convert_file(glob.escape('[0].txt'), 'rst')
.
Third, if still can't, I add this issue to help people who face this problem, and want to find solution in github issue like me.
Have problem in using pypandoc with path like '[0].txt', baceuse glob.glob returns
[]
and causeformat = _identify_format_from_path(discovered_source_files[0], format)
index out of rangeSeems need to use glob.escape, which returns
['[[]0].txt']
.