@3-/aiapi 0.1.86 → 0.1.88
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/check/GEN.js +1 -1
- package/fmtJsonMd.js +10 -5
- package/package.json +1 -1
package/check/GEN.js
CHANGED
package/fmtJsonMd.js
CHANGED
|
@@ -11,9 +11,15 @@ txtFmt = (txt) => {
|
|
|
11
11
|
|
|
12
12
|
export default (user, title_json_li) => {
|
|
13
13
|
var li, md_li, title, userName, x, y, 回答者, 提问者, 答, 问, 题;
|
|
14
|
-
userName = (n) => {
|
|
15
|
-
var
|
|
16
|
-
|
|
14
|
+
userName = (label, n) => {
|
|
15
|
+
var name, t;
|
|
16
|
+
t = user[n - 1];
|
|
17
|
+
if (t) {
|
|
18
|
+
({name} = t);
|
|
19
|
+
} else {
|
|
20
|
+
name = label;
|
|
21
|
+
}
|
|
22
|
+
return '**<u>' + name + '</u>:** ';
|
|
17
23
|
};
|
|
18
24
|
md_li = [];
|
|
19
25
|
for (x of title_json_li) {
|
|
@@ -25,8 +31,7 @@ export default (user, title_json_li) => {
|
|
|
25
31
|
if ((答.startsWith('1. ')) || 答.endsWith(':') || 答.endsWith(':')) {
|
|
26
32
|
答 = '\n' + 答;
|
|
27
33
|
}
|
|
28
|
-
|
|
29
|
-
md_li.push('### ' + 题 + '\n' + userName(提问者) + '\t问: ' + txtFmt(问).trimEnd() + '\n\n' + userName(回答者) + '\t答:' + 答 + '\n');
|
|
34
|
+
md_li.push('### ' + 题 + '\n' + userName('问', 提问者) + txtFmt(问).trimEnd() + '\n\n' + userName('答', 回答者) + 答 + '\n');
|
|
30
35
|
}
|
|
31
36
|
}
|
|
32
37
|
return md_li.map(refmt).join('\n');
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@3-/aiapi","version":"0.1.
|
|
1
|
+
{"name":"@3-/aiapi","version":"0.1.88","repository":{"type":"git","url":"git+https://atomgit.com/i18n/lib.git"},"homepage":"https://atomgit.com/i18n/lib/tree/dev/aiapi","author":"i18n.site@gmail.com","license":"MulanPSL-2.0","exports":{".":"./lib.js","./*":"./*"},"files":["./*"],"devDependencies":{"@3-/read":"^0.1.4"},"scripts":{},"type":"module","dependencies":{"@3-/retry":"^0.0.2","@3-/rm_cn_space":"^0.1.3","@3-/sleep":"^0.0.4","@3-/txt_li":"^0.1.6","@3-/utf8":"^0.0.4","@tron-format/tron":"^0.1.3","lodash-es":"^4.17.23"}}
|