fix: Remove double interpolation for attachments (BREAKING) #284
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The use case was that when using the "attachment://", it would replace the link twice, once on the "attachment://" and after that on the replace all as well as the string will be present in the replacement. This ensures that the keyword only get replcaed once.
Furthermore, put "attachment://" in as a identifier for a replacement is better then nothing since you effectively create a ban word in the name of the attachement file.
if you have an
attachement://foo
, currently it get transformed into/wiki/<path>/foo?query
which get transformed into/wiki/<path>/wiki/<path>/foo?query?query
this PR changes it to only have a single interpolation.
Note that this is a breaking change as simple text references to files will break. But it seems better to prefix it with
attachement://
anyways to avoid creating ban words in your text.