lingo.dev 0.87.9 → 0.87.11

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/build/cli.cjs CHANGED
@@ -3131,7 +3131,7 @@ function extractCodePlaceholders(content) {
3131
3131
  for (const match of codeBlockMatches) {
3132
3132
  const codeBlock = match[0];
3133
3133
  const codeBlockHash = md5(codeBlock);
3134
- const placeholder = `---CODE_PLACEHOLDER_${codeBlockHash}---`;
3134
+ const placeholder = `---CODE-PLACEHOLDER-${codeBlockHash}---`;
3135
3135
  codePlaceholders[placeholder] = codeBlock;
3136
3136
  const replacement = codeBlock.trim().startsWith(">") ? `> ${placeholder}` : `${placeholder}`;
3137
3137
  finalContent = finalContent.replace(codeBlock, replacement);
@@ -3140,7 +3140,7 @@ function extractCodePlaceholders(content) {
3140
3140
  for (const match of inlineCodeMatches) {
3141
3141
  const inlineCode = match[0];
3142
3142
  const inlineCodeHash = md5(inlineCode);
3143
- const placeholder = `---INLINE_CODE_PLACEHOLDER_${inlineCodeHash}---`;
3143
+ const placeholder = `---INLINE-CODE-PLACEHOLDER-${inlineCodeHash}---`;
3144
3144
  codePlaceholders[placeholder] = inlineCode;
3145
3145
  const replacement = placeholder;
3146
3146
  finalContent = finalContent.replace(inlineCode, replacement);
@@ -3156,12 +3156,15 @@ function createMdxCodePlaceholderLoader() {
3156
3156
  const response = extractCodePlaceholders(input2);
3157
3157
  return response.content;
3158
3158
  },
3159
- async push(locale, data, originalInput) {
3160
- const response = extractCodePlaceholders(_nullishCoalesce(originalInput, () => ( "")));
3159
+ async push(locale, data, originalInput, originalLocale, pullInput) {
3160
+ const sourceInfo = extractCodePlaceholders(_nullishCoalesce(originalInput, () => ( "")));
3161
+ const currentInfo = extractCodePlaceholders(_nullishCoalesce(pullInput, () => ( "")));
3162
+ const codePlaceholders = _lodash2.default.merge(
3163
+ sourceInfo.codePlaceholders,
3164
+ currentInfo.codePlaceholders
3165
+ );
3161
3166
  let result = data;
3162
- for (const [placeholder, original] of Object.entries(
3163
- response.codePlaceholders
3164
- )) {
3167
+ for (const [placeholder, original] of Object.entries(codePlaceholders)) {
3165
3168
  const replacement = original.startsWith(">") ? _lodash2.default.trimStart(original, "> ") : original;
3166
3169
  result = result.replaceAll(placeholder, replacement);
3167
3170
  }
@@ -5658,7 +5661,7 @@ function validateParams2(i18nConfig, flags) {
5658
5661
  // package.json
5659
5662
  var package_default = {
5660
5663
  name: "lingo.dev",
5661
- version: "0.87.9",
5664
+ version: "0.87.11",
5662
5665
  description: "Lingo.dev CLI",
5663
5666
  private: false,
5664
5667
  publishConfig: {