@rhseung/ps-cli 1.11.0 → 1.11.1
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/{chunk-CCTXJBQK.js → chunk-CGL3LQEB.js} +1 -1
- package/dist/{chunk-Z4O2T5WH.js → chunk-ERJEYECY.js} +1 -1
- package/dist/{chunk-NQ267PM5.js → chunk-G272SKVM.js} +1 -1
- package/dist/{chunk-S7IL7OXF.js → chunk-U6KQM2P4.js} +11 -0
- package/dist/commands/fetch.js +3 -3
- package/dist/commands/search.js +4 -4
- package/dist/commands/stats.js +2 -2
- package/dist/commands/test.js +3 -3
- package/package.json +1 -1
|
@@ -295,6 +295,11 @@ ${preContent}
|
|
|
295
295
|
});
|
|
296
296
|
return result.trim();
|
|
297
297
|
}
|
|
298
|
+
function convertLatexToMarkdown(text) {
|
|
299
|
+
return text.replace(/\\\[([\s\S]*?)\\\]/g, (match, latexCode) => {
|
|
300
|
+
return `$${latexCode}$`;
|
|
301
|
+
});
|
|
302
|
+
}
|
|
298
303
|
async function scrapeProblem(problemId) {
|
|
299
304
|
const url = `${BOJ_BASE_URL}/problem/${problemId}`;
|
|
300
305
|
const html = await fetchWithRetry(url, `\uBB38\uC81C ${problemId}`);
|
|
@@ -307,10 +312,12 @@ async function scrapeProblem(problemId) {
|
|
|
307
312
|
if (!description) {
|
|
308
313
|
description = descriptionEl.text().trim();
|
|
309
314
|
}
|
|
315
|
+
description = convertLatexToMarkdown(description);
|
|
310
316
|
} else {
|
|
311
317
|
const altDesc = $('[id*="description"]').first();
|
|
312
318
|
if (altDesc.length > 0) {
|
|
313
319
|
description = altDesc.text().trim();
|
|
320
|
+
description = convertLatexToMarkdown(description);
|
|
314
321
|
}
|
|
315
322
|
}
|
|
316
323
|
const inputEl = $("#problem_input");
|
|
@@ -320,10 +327,12 @@ async function scrapeProblem(problemId) {
|
|
|
320
327
|
if (!inputFormat) {
|
|
321
328
|
inputFormat = inputEl.text().trim();
|
|
322
329
|
}
|
|
330
|
+
inputFormat = convertLatexToMarkdown(inputFormat);
|
|
323
331
|
} else {
|
|
324
332
|
const altInput = $('[id*="input"]').first();
|
|
325
333
|
if (altInput.length > 0) {
|
|
326
334
|
inputFormat = altInput.text().trim();
|
|
335
|
+
inputFormat = convertLatexToMarkdown(inputFormat);
|
|
327
336
|
}
|
|
328
337
|
}
|
|
329
338
|
const outputEl = $("#problem_output");
|
|
@@ -333,10 +342,12 @@ async function scrapeProblem(problemId) {
|
|
|
333
342
|
if (!outputFormat) {
|
|
334
343
|
outputFormat = outputEl.text().trim();
|
|
335
344
|
}
|
|
345
|
+
outputFormat = convertLatexToMarkdown(outputFormat);
|
|
336
346
|
} else {
|
|
337
347
|
const altOutput = $('[id*="output"]').first();
|
|
338
348
|
if (altOutput.length > 0) {
|
|
339
349
|
outputFormat = altOutput.text().trim();
|
|
350
|
+
outputFormat = convertLatexToMarkdown(outputFormat);
|
|
340
351
|
}
|
|
341
352
|
}
|
|
342
353
|
const problemInfo = {};
|
package/dist/commands/fetch.js
CHANGED
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
FetchCommand,
|
|
4
4
|
FetchView,
|
|
5
5
|
fetch_default
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-CGL3LQEB.js";
|
|
7
|
+
import "../chunk-ERJEYECY.js";
|
|
8
|
+
import "../chunk-U6KQM2P4.js";
|
|
9
9
|
import "../chunk-AHE4QHJD.js";
|
|
10
10
|
export {
|
|
11
11
|
FetchCommand,
|
package/dist/commands/search.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
TestView
|
|
7
7
|
} from "../chunk-COPOWZM5.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-G272SKVM.js";
|
|
9
9
|
import "../chunk-MZUR7SER.js";
|
|
10
10
|
import {
|
|
11
11
|
ArchiveView
|
|
@@ -14,13 +14,13 @@ import "../chunk-LCHSAHUP.js";
|
|
|
14
14
|
import "../chunk-XNZBOLC2.js";
|
|
15
15
|
import {
|
|
16
16
|
FetchView
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import "../chunk-
|
|
17
|
+
} from "../chunk-CGL3LQEB.js";
|
|
18
|
+
import "../chunk-ERJEYECY.js";
|
|
19
19
|
import {
|
|
20
20
|
fetchWithRetry,
|
|
21
21
|
getProblem,
|
|
22
22
|
searchProblems
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-U6KQM2P4.js";
|
|
24
24
|
import "../chunk-QT2FQELR.js";
|
|
25
25
|
import {
|
|
26
26
|
OpenView
|
package/dist/commands/stats.js
CHANGED
package/dist/commands/test.js
CHANGED
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
TestView,
|
|
5
5
|
test_default
|
|
6
6
|
} from "../chunk-COPOWZM5.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-G272SKVM.js";
|
|
8
8
|
import "../chunk-MZUR7SER.js";
|
|
9
9
|
import "../chunk-LCHSAHUP.js";
|
|
10
10
|
import "../chunk-XNZBOLC2.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-ERJEYECY.js";
|
|
12
|
+
import "../chunk-U6KQM2P4.js";
|
|
13
13
|
import "../chunk-QT2FQELR.js";
|
|
14
14
|
import "../chunk-3LR2NGRC.js";
|
|
15
15
|
import "../chunk-QGMWUOJ3.js";
|