lingo.dev 0.87.2 → 0.87.3
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 +7 -6
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +7 -6
- package/build/cli.mjs.map +1 -1
- package/package.json +1 -1
package/build/cli.mjs
CHANGED
|
@@ -3099,14 +3099,14 @@ function md5(input2) {
|
|
|
3099
3099
|
|
|
3100
3100
|
// src/cli/loaders/mdx2/code-placeholder.ts
|
|
3101
3101
|
import _20 from "lodash";
|
|
3102
|
-
var
|
|
3103
|
-
var indentedFenceRegex = /```([\s\S]*?)```/g;
|
|
3102
|
+
var fenceRegex = /```([\s\S]*?)```/g;
|
|
3104
3103
|
function ensureTrailingFenceNewline(_content) {
|
|
3105
3104
|
let found = false;
|
|
3106
3105
|
let content = _content;
|
|
3106
|
+
let workingContent = content;
|
|
3107
3107
|
do {
|
|
3108
3108
|
found = false;
|
|
3109
|
-
const matches =
|
|
3109
|
+
const matches = workingContent.match(fenceRegex);
|
|
3110
3110
|
if (matches) {
|
|
3111
3111
|
const match = matches[0];
|
|
3112
3112
|
content = content.replace(match, `
|
|
@@ -3114,17 +3114,18 @@ function ensureTrailingFenceNewline(_content) {
|
|
|
3114
3114
|
${match}
|
|
3115
3115
|
|
|
3116
3116
|
`);
|
|
3117
|
+
workingContent = workingContent.replace(match, "");
|
|
3117
3118
|
found = true;
|
|
3118
3119
|
}
|
|
3119
3120
|
} while (found);
|
|
3120
|
-
content = _20.chain(content).split("\n\n").filter(Boolean).join("\n\n").value();
|
|
3121
|
+
content = _20.chain(content).split("\n\n").map((section) => section.trim()).filter(Boolean).join("\n\n").value();
|
|
3121
3122
|
return content;
|
|
3122
3123
|
}
|
|
3123
3124
|
function extractCodePlaceholders(content) {
|
|
3124
3125
|
let finalContent = content;
|
|
3125
3126
|
finalContent = ensureTrailingFenceNewline(finalContent);
|
|
3126
3127
|
const codePlaceholders = {};
|
|
3127
|
-
const codeBlockMatches = finalContent.matchAll(
|
|
3128
|
+
const codeBlockMatches = finalContent.matchAll(fenceRegex);
|
|
3128
3129
|
for (const match of codeBlockMatches) {
|
|
3129
3130
|
const codeBlock = match[0];
|
|
3130
3131
|
const codeBlockHash = md5(codeBlock);
|
|
@@ -5644,7 +5645,7 @@ function validateParams2(i18nConfig, flags) {
|
|
|
5644
5645
|
// package.json
|
|
5645
5646
|
var package_default = {
|
|
5646
5647
|
name: "lingo.dev",
|
|
5647
|
-
version: "0.87.
|
|
5648
|
+
version: "0.87.3",
|
|
5648
5649
|
description: "Lingo.dev CLI",
|
|
5649
5650
|
private: false,
|
|
5650
5651
|
publishConfig: {
|