Skip to content

Commit 0258c07

Browse files
committed
fix: 🐛 remove unused group naming in regex
Closes: #313
1 parent 2aac6be commit 0258c07

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

docs/docs/blog-posts.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ title: Blog Posts
1111
<div className="blog-image" style={{backgroundImage: "url('https://miro.medium.com/max/1200/1*X1LKTIx6awH2C2xB7G7Nvg.png')"}}></div>
1212
</a>
1313

14+
<a className="blog-post" href="https://medium.com/@shahar.kazaz/transloco-proudly-presents-functional-translations-e73fca275c33" rel="noopener noreferrer" target="_blank" spellCheck="false">
15+
<div className="blog-preview">
16+
<div className="blog-title">Transloco Proudly Presents: Functional Translations</div>
17+
<div className="blog-description">A friend told me of an exciting use-case, where he needed to change translation values depending on whether the user was allowed access to a feature or not.…</div>
18+
<div className="blog-source">medium.com</div>
19+
</div>
20+
<div className="blog-image" style={{backgroundImage: "url('https://miro.medium.com/max/1200/1*oJcxt06UXLSNyvbqNe18tA.png')"}}></div>
21+
</a>
22+
1423
<a className="blog-post" href="https://medium.com/@ItayOded/lazy-load-and-encapsulate-i18n-files-in-angular-with-transloco-55af44885797" rel="noopener noreferrer" target="_blank" spellCheck="false">
1524
<div className="blog-preview">
1625
<div className="blog-title">Lazy Load and Encapsulate i18n Files in Angular with Transloco</div>

projects/ngneat/transloco/src/lib/transloco.transpiler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export class FunctionalTranspiler extends DefaultTranspiler implements Transloco
100100
transpile(value: any, params: HashMap = {}, translation: Translation): any {
101101
if (isString(value)) {
102102
const transpiled = value.replace(
103-
/\[\[\s*(?<functionName>\w+)\((?<args>.*)\)\s*]]/g,
103+
/\[\[\s*(\w+)\((.*)\)\s*]]/g,
104104
(match: string, functionName: string, args: string) => {
105105
try {
106106
const func: TranslocoTranspilerFunction = this.injector.get(functionName);

0 commit comments

Comments
 (0)