danieleades / mdbook-d2

D2 diagram generator plugin for MdBook
MIT License
26 stars 8 forks source link

Change backslash to forward slash on windows #66

Closed christianjann closed 2 months ago

christianjann commented 3 months ago

Change backslash to forward slash for windows compatibility

rel_path might be something like d2\1.1.svg which does not work in html

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.18%. Comparing base (fbd3661) to head (3e66980).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #66 +/- ## ========================================== + Coverage 77.82% 78.18% +0.36% ========================================== Files 4 4 Lines 239 243 +4 ========================================== + Hits 186 190 +4 Misses 53 53 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

danieleades commented 3 months ago

thanks for the contribution!

It would be good to first see a failing test without this change, then to see the test succeed after the change

christianjann commented 2 months ago

thanks for the contribution!

It would be good to first see a failing test without this change, then to see the test succeed after the change

Not sure yet how to best test this, how to check the generated html for the correct path, might be better to just merge and unblock other windows users and maybe think about some generic end-2-end tests later.

danieleades commented 2 months ago

unfortunately testing on windows is blocked on https://github.com/terrastruct/d2/issues/2044