lingo.dev 0.87.8 → 0.87.10

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.mjs CHANGED
@@ -3100,6 +3100,7 @@ function md5(input2) {
3100
3100
  // src/cli/loaders/mdx2/code-placeholder.ts
3101
3101
  import _20 from "lodash";
3102
3102
  var fenceRegex = /([ \t]*)(^>\s*)?```([\s\S]*?)```/gm;
3103
+ var inlineCodeRegex = /(?<!`)`([^`\r\n]+?)`(?!`)/g;
3103
3104
  function ensureTrailingFenceNewline(_content) {
3104
3105
  let found = false;
3105
3106
  let content = _content;
@@ -3130,11 +3131,20 @@ function extractCodePlaceholders(content) {
3130
3131
  for (const match of codeBlockMatches) {
3131
3132
  const codeBlock = match[0];
3132
3133
  const codeBlockHash = md5(codeBlock);
3133
- const placeholder = `---CODE_PLACEHOLDER_${codeBlockHash}---`;
3134
+ const placeholder = `---CODE-PLACEHOLDER-${codeBlockHash}---`;
3134
3135
  codePlaceholders[placeholder] = codeBlock;
3135
3136
  const replacement = codeBlock.trim().startsWith(">") ? `> ${placeholder}` : `${placeholder}`;
3136
3137
  finalContent = finalContent.replace(codeBlock, replacement);
3137
3138
  }
3139
+ const inlineCodeMatches = finalContent.matchAll(inlineCodeRegex);
3140
+ for (const match of inlineCodeMatches) {
3141
+ const inlineCode = match[0];
3142
+ const inlineCodeHash = md5(inlineCode);
3143
+ const placeholder = `---INLINE-CODE-PLACEHOLDER-${inlineCodeHash}---`;
3144
+ codePlaceholders[placeholder] = inlineCode;
3145
+ const replacement = placeholder;
3146
+ finalContent = finalContent.replace(inlineCode, replacement);
3147
+ }
3138
3148
  return {
3139
3149
  content: finalContent,
3140
3150
  codePlaceholders
@@ -5648,7 +5658,7 @@ function validateParams2(i18nConfig, flags) {
5648
5658
  // package.json
5649
5659
  var package_default = {
5650
5660
  name: "lingo.dev",
5651
- version: "0.87.8",
5661
+ version: "0.87.10",
5652
5662
  description: "Lingo.dev CLI",
5653
5663
  private: false,
5654
5664
  publishConfig: {