Closed phil-w closed 2 years ago
thanks for reporting it - actually the code to handle this case is in there, but the if clause was not correctly combined...
if (
!string.IsNullOrEmpty(this._options.AttachmentsPath) &&
(link.Url.StartsWith("/.attachments") || link.Url.StartsWith(".attachments"))
)
will be fixed in the next release and then both formats work.
I should have spotted that straight off... but then I always parenthesise that stuff ;-) Thanks for a very handy tool, saved me a ton of work. I only had 2 links with the form which caused this, so by default almost everything worked fine.
Other stuff I noted (it may help someone else:
Tested across 269 pages, windows-latest etc.
Nice - thanks for sharing the feedback :)
Both of these render perfectly in AzureDevOps, but the second will crash any attempt to export it to PDF with an error Value cannot be null. (Parameter 'path1') when rendering attachments using a windows-latest pipeline on Azure Dev Ops.
![image.png](/.attachments/image-30a0a101-2c35-474a-bbf4-a355524956a5.png)
![image.png](.attachments/image-30a0a101-2c35-474a-bbf4-a355524956a5.png)
The code throwing up is below. Note that it allows either format URL, but the one without the leading slash crashes. Easy for the wiki user to fix, but easier if you know what it is.