asciidocfx / AsciidocFX

Asciidoc Editor and Toolchain written with JavaFX 21 (Build PDF, Epub, Mobi and HTML books, documents and slides)
http://www.asciidocfx.com/
Apache License 2.0
1.88k stars 295 forks source link

Remove erroneous path prefix when using absolute paths on windows #505

Closed Ayowel closed 3 years ago

Ayowel commented 3 years ago

Fix #504 , use regex to ensure that the replacement only occurs when receiving erroneous windows paths (checks for drive letter marker)

As discussed in the issue, I believe that this should NOT be merged and should be fixed when parsing asciidoc instead of when requesting a specific file, however I did not figure out where the actual parsing of include directives occurs

rahmanusta commented 3 years ago

Hi, thanks for reporting and the pull request. I propose to fix that issue in IOHelper class. Can you please check the commit ? https://github.com/asciidocfx/AsciidocFX/commit/ac809116fe83c71fb81ee6b603371bb4db1ca289

It has worked here for a Windows machine, let me know if you see any issue with this change.

Ayowel commented 3 years ago

👍 Looks good to me & is much more clean than what I have done.