wpreadme2markdown / wp-readme-to-markdown

Convert WordPress Plugin Readme Files to GitHub Flavored Markdown
MIT License
92 stars 20 forks source link

Add support for relative paths #22

Closed inderpreet99 closed 8 years ago

inderpreet99 commented 8 years ago

Previously the command wasn't able to pickup relative paths. The following fails.

$ touch readme.txt
$ wp2md convert readme.txt README.md
You should specify a readable readme file

With this fix, it will correctly pickup the readme.txt relative file, as well as support absolute ones.

sunchaserinfo commented 8 years ago

It's a phar issue which I was unaware of. Thanks for noticing.

However stream_resolve_include_path is not really a good solution for this, it may find file in PEAR directory for example. Better way is to use realpath to convert relative path to absolute path internally. Fixed

Please open an issue first and then attach a pull request to it next time. It's easier to track an issue and a fix separately