@nxtedition/lib 14.0.16 → 14.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "14.0.16",
3
+ "version": "14.0.17",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "files": [
@@ -165,7 +165,16 @@ module.exports = ({ ds, proxify }) => {
165
165
  return (str, args$) => expr(args$)
166
166
  }
167
167
 
168
- return (str, args$) => expr(args$).pipe(rx.map((body) => `${pre}${stringify(body)}${post}`))
168
+ return (str, args$) =>
169
+ rxjs
170
+ .combineLatest([
171
+ compileStringTemplate(pre)?.(str, args$) ?? rxjs.of(pre),
172
+ expr(args$),
173
+ compileStringTemplate(post)?.(str, args$) ?? rxjs.of(post),
174
+ ])
175
+ .pipe(
176
+ rx.map(([pre, body, post]) => (pre || post ? `${pre}${stringify(body)}${post}` : body))
177
+ )
169
178
  } else if (type === 'nxt') {
170
179
  const expr = compilers.nxt(body)
171
180