Open raboof opened 4 years ago
Would adding a replace ' ', '%20' at the link below be a possible fix?
I don't know - is it possible for you to test?
Yeah, I'll test it. Haven't done much in the way of sbt-plugin development.
I cloned out the repo and ran an sbt compile / test, and the following tests failed:
[info] Tests: succeeded 204, failed 22, canceled 0, ignored 0, pending 0
[info] *** 22 TESTS FAILED ***
[error] Failed tests:
[error] com.lightbend.paradox.markdown.FrontinSpec
[error] com.lightbend.paradox.markdown.SnipDirectiveSpec
[error] com.lightbend.paradox.markdown.SnippetIndentationTest
[error] com.lightbend.paradox.markdown.GitHubDirectiveSpec
[error] com.lightbend.paradox.markdown.IndexSpec
[error] (tests / Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 17 s, completed Apr 22, 2021 9:17:48 AM
All the failures had the same stack trace on a windows 10 box, scala 2.12 running sbt 1.5 which grabbed sbt 1.4.7.
[info] java.net.URISyntaxException: Illegal character in path at index 13: /Users/(my username with spaces)/projects/paradox/.
[info] at java.net.URI$Parser.fail(Unknown Source)
[info] at java.net.URI$Parser.checkChars(Unknown Source)
[info] at java.net.URI$Parser.parseHierarchical(Unknown Source)
[info] at java.net.URI$Parser.parse(Unknown Source)
[info] at java.net.URI.<init>(Unknown Source)
[info] at com.lightbend.paradox.markdown.Path$.relativeLocalPath(Page.scala:235)
Probably adding a specific whitespace inclusive test to the PathSpec would be warranted. https://github.com/lightbend/paradox/blob/e2e5b64a20d39afd88f81f1d29ecb5786005f640/tests/src/test/scala/com/lightbend/paradox/markdown/PathSpec.scala
I'll let you know where I get and will create a PR if string replacement into the URI fixes it.
Adding a simple additional replace
call to .repalce('\\','/').replace(" ", "%20")
fixed one test and then caused some missing resource stack traces. I'm at the end of time I can allot to it today, and I'm not sure when I will come back to it so I'll attach these sbt test
results with that one change to put a pin in it for the time being.
test_results.txt
.
I'm at the end of time I can allot to it today, and I'm not sure when I will come back to it so I'll attach these
sbt test
results with that one change to put a pin in it for the time being.
Thanks for nudging this forward!