lingo.dev 0.87.6 → 0.87.8
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 +12 -9
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +12 -9
- package/build/cli.mjs.map +1 -1
- package/package.json +1 -1
package/build/cli.cjs
CHANGED
|
@@ -3109,16 +3109,17 @@ function ensureTrailingFenceNewline(_content) {
|
|
|
3109
3109
|
const matches = workingContent.match(fenceRegex);
|
|
3110
3110
|
if (matches) {
|
|
3111
3111
|
const match = matches[0];
|
|
3112
|
-
|
|
3112
|
+
const replacement = match.trim().startsWith(">") ? match : `
|
|
3113
3113
|
|
|
3114
3114
|
${match}
|
|
3115
3115
|
|
|
3116
|
-
|
|
3117
|
-
|
|
3116
|
+
`;
|
|
3117
|
+
content = content.replaceAll(match, replacement);
|
|
3118
|
+
workingContent = workingContent.replaceAll(match, "");
|
|
3118
3119
|
found = true;
|
|
3119
3120
|
}
|
|
3120
3121
|
} while (found);
|
|
3121
|
-
content = _lodash2.default.chain(content).split("\n\n").map((section) =>
|
|
3122
|
+
content = _lodash2.default.chain(content).split("\n\n").map((section) => _lodash2.default.trim(section, "\n")).filter(Boolean).join("\n\n").value();
|
|
3122
3123
|
return content;
|
|
3123
3124
|
}
|
|
3124
3125
|
function extractCodePlaceholders(content) {
|
|
@@ -3129,9 +3130,10 @@ function extractCodePlaceholders(content) {
|
|
|
3129
3130
|
for (const match of codeBlockMatches) {
|
|
3130
3131
|
const codeBlock = match[0];
|
|
3131
3132
|
const codeBlockHash = md5(codeBlock);
|
|
3132
|
-
const
|
|
3133
|
-
codePlaceholders[
|
|
3134
|
-
|
|
3133
|
+
const placeholder = `---CODE_PLACEHOLDER_${codeBlockHash}---`;
|
|
3134
|
+
codePlaceholders[placeholder] = codeBlock;
|
|
3135
|
+
const replacement = codeBlock.trim().startsWith(">") ? `> ${placeholder}` : `${placeholder}`;
|
|
3136
|
+
finalContent = finalContent.replace(codeBlock, replacement);
|
|
3135
3137
|
}
|
|
3136
3138
|
return {
|
|
3137
3139
|
content: finalContent,
|
|
@@ -3150,7 +3152,8 @@ function createMdxCodePlaceholderLoader() {
|
|
|
3150
3152
|
for (const [placeholder, original] of Object.entries(
|
|
3151
3153
|
response.codePlaceholders
|
|
3152
3154
|
)) {
|
|
3153
|
-
|
|
3155
|
+
const replacement = original.startsWith(">") ? _lodash2.default.trimStart(original, "> ") : original;
|
|
3156
|
+
result = result.replaceAll(placeholder, replacement);
|
|
3154
3157
|
}
|
|
3155
3158
|
return result;
|
|
3156
3159
|
}
|
|
@@ -5645,7 +5648,7 @@ function validateParams2(i18nConfig, flags) {
|
|
|
5645
5648
|
// package.json
|
|
5646
5649
|
var package_default = {
|
|
5647
5650
|
name: "lingo.dev",
|
|
5648
|
-
version: "0.87.
|
|
5651
|
+
version: "0.87.8",
|
|
5649
5652
|
description: "Lingo.dev CLI",
|
|
5650
5653
|
private: false,
|
|
5651
5654
|
publishConfig: {
|