carlos-jenkins / plantweb

Plantweb is a Python client for the PlantUML server -
https://plantweb.readthedocs.io/
Apache License 2.0
27 stars 15 forks source link

Directive URL #15

Closed gregerspoulsen closed 4 years ago

gregerspoulsen commented 4 years ago

The sphinx directive fails on Windows because the backslashes in the url are removed in the Image directive. I have added a simple hack to replace backslashes with slashes, I am not sure if this is the right way to do it, but it works!

carlos-jenkins commented 4 years ago

Hi! Thanks a lot for the PR. So it looks like the Sphinx's Image directive accepts only paths in POSIX form, correct?

Right now we have backward compatibility with Python 2.7, so the proposed fix is ok. In the future, we could replace the string replacement with:

https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.as_posix

Regards!

gregerspoulsen commented 4 years ago

Hi! Thanks a lot for the PR. So it looks like the Sphinx's Image directive accepts only paths in POSIX form, correct?

At least that is what I experienced, but I have not found documentation mentioning it.

Could I convince you to push it to pypi? It would be great to able to pip install a working version :)

carlos-jenkins commented 4 years ago

@gregerspoulsen hi, this change was released to PyPI with release 1.2.1. Regards