Repository navigation
Conversation
replaceAll read $$, $&, $` and $' in the title, content and other values as replacement patterns. Placeholders are now replaced in one pass, so a placeholder-like text in a value is kept too.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Custom integrations change the entry text when it contains
$:Costs $$5Costs $5R$& moreR[title] more$$math block in[content_markdown]$replaceAll(placeholder, value)reads$$,$&,$`and$'in the value as replacement patterns. With$`or$', a part of the template is inserted, so a JSON body can become invalid.The placeholders were also replaced one after the other, so a title like
[url]was replaced by the URL in the next step.Now all placeholders are replaced in one pass with a replacer function.
Tests
Added to
custom-integration-manager.test.ts; 3 of the 4 new tests fail before the change.vitest run src/modules/integration: 23 passed. eslint and prettier are clean for both files.