@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jutge.org/toolkit",
3
3
  "description": "Toolkit to prepare problems for Jutge.org",
4
- "version": "4.4.51",
4
+ "version": "4.4.52",
5
5
  "homepage": "https://jutge.org",
6
6
  "author": {
7
7
  "name": "Jutge.org",
@@ -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
- for (const language of problem.languages) {
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)