Skip to content

Fix : replaced all occurrences of placeholders in document target path - #504

Open
stefanwakata wants to merge 2 commits into
mirego:masterfrom
stefanwakata:fix-496
Open

Fix : replaced all occurrences of placeholders in document target path#504
stefanwakata wants to merge 2 commits into
mirego:masterfrom
stefanwakata:fix-496

Conversation

@stefanwakata

Copy link
Copy Markdown

Fixes #496

The ".replace()" calls in "document-jipt-paths-fetcher.ts" and "document-paths-fetcher.ts" only replaced the first match of each placeholder (%slug%, %original_file_name%, %document_path%), since a plain regex/string replace in JS stops after one hit. Added the "/g" flag so all occurrences get replaced.

Tested with the target pattern from the issue (%document_path%/%document_path%.%slug%.resx), before this it produced "Description/%document_path%.de.resx", now it correctly produces "Description/Description.de.resx". Also ran "npm run build" and the CI checks on my fork, both green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] CLI export only replaces first %document_path% placeholder in target path

1 participant