@nebulars/sseengine 1.3.56 → 1.3.58
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
package/src/store/tub.js
CHANGED
|
@@ -16,7 +16,7 @@ export default ({ http, closest, copy, toimg, download, excel, toast, $ }) => {
|
|
|
16
16
|
|
|
17
17
|
async TUB_COPY({ dispatch }, { markdown }) {
|
|
18
18
|
// Get TSV
|
|
19
|
-
const tsv = await dispatch('TSV_CREATE', markdown);
|
|
19
|
+
const tsv = await dispatch('TSV_CREATE', { markdown, sup: false });
|
|
20
20
|
|
|
21
21
|
// Copy
|
|
22
22
|
copy(tsv);
|
|
@@ -41,7 +41,7 @@ export default ({ http, closest, copy, toimg, download, excel, toast, $ }) => {
|
|
|
41
41
|
|
|
42
42
|
async TUB_DOWNLOAD({ dispatch }, { markdown, table }) {
|
|
43
43
|
// Get TSV
|
|
44
|
-
const tsv = await dispatch('TSV_CREATE', markdown);
|
|
44
|
+
const tsv = await dispatch('TSV_CREATE', { markdown, sup: false });
|
|
45
45
|
|
|
46
46
|
// Set Rows
|
|
47
47
|
const rows = tsv.split('\n').map(row => row.split('\t'));
|
|
@@ -68,9 +68,14 @@ export default ({ http, closest, copy, toimg, download, excel, toast, $ }) => {
|
|
|
68
68
|
excel.writeFile(book, `${answer}.xlsx`);
|
|
69
69
|
},
|
|
70
70
|
|
|
71
|
-
async TSV_CREATE({}, markdown) {
|
|
71
|
+
async TSV_CREATE({}, { markdown, sup }) {
|
|
72
72
|
// Reset Markdown
|
|
73
|
-
|
|
73
|
+
let content = markdown;
|
|
74
|
+
|
|
75
|
+
// Sup
|
|
76
|
+
if (sup === false) {
|
|
77
|
+
content = content.replace(/<sup[\w\s\-\=\"]+\>\d+\<\/sup>/g, '');
|
|
78
|
+
}
|
|
74
79
|
|
|
75
80
|
// Set Lines
|
|
76
81
|
const lines = content.trim().split('\n');
|
|
@@ -121,7 +126,8 @@ export default ({ http, closest, copy, toimg, download, excel, toast, $ }) => {
|
|
|
121
126
|
filter(node) {
|
|
122
127
|
// No Sup
|
|
123
128
|
if (node.tagName === 'SUP') {
|
|
124
|
-
|
|
129
|
+
// 保留注脚
|
|
130
|
+
// return false;
|
|
125
131
|
}
|
|
126
132
|
|
|
127
133
|
// Any
|