@jutge.org/toolkit 4.4.51 → 4.4.52
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/dist/index.js +396 -396
- package/package.json +1 -1
- package/toolkit/convert.ts +8 -1
package/package.json
CHANGED
package/toolkit/convert.ts
CHANGED
|
@@ -23,7 +23,14 @@ convertCmd
|
|
|
23
23
|
for (const realDirectory of realDirectories) {
|
|
24
24
|
await tui.section(`Processing ${realDirectory}`, async () => {
|
|
25
25
|
const problem = await newProblem(realDirectory)
|
|
26
|
-
|
|
26
|
+
// Single structure keeps one language per directory (ca/, en/, …).
|
|
27
|
+
// findRealDirectories visits each of those directories on its own,
|
|
28
|
+
// so only the statement in the current directory belongs here.
|
|
29
|
+
const languages =
|
|
30
|
+
problem.structure === 'single' && problem.language
|
|
31
|
+
? problem.languages.filter((language) => language === problem.language)
|
|
32
|
+
: problem.languages
|
|
33
|
+
for (const language of languages) {
|
|
27
34
|
await tui.section(`Converting problem.${language}.tex`, async () => {
|
|
28
35
|
const originalText = await readTextInDir(realDirectory, `problem.${language}.tex`)
|
|
29
36
|
const convertedText = replaceAtSigns(originalText)
|