Skip to content

Commit efa7cf7

Browse files
committed
more work on doc generation
1 parent e777cee commit efa7cf7

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

plugins/cls-loader/src/plugin/classes.ts

+9-5
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,18 @@ function reshapeHTML(text) {
203203
text = text.join(" ");
204204
}
205205
text = text.replaceAll(/<[^>]*>/gi, "");
206-
text = text.replaceAll(/({|}|\[|\])/g, "\\$1");
206+
text = text.replaceAll("{", "&#123;");
207+
text = text.replaceAll("}", "&#125;");
208+
// text = text.replaceAll(/({|}|\[|\])/g, "\\$1");
207209

208-
text = text.replaceAll(/\<br\s*\/?\>/gi, "\n\n");
209-
text = text.replaceAll(/\<\/?p\>/gi, "\n\n");
210+
text = text.replaceAll(/\<br\s*\/?\>/gi, "<br />");
211+
text = text.replaceAll(/<\/?p[^>]*>/gi, "\n\n");
212+
text = text.replaceAll(/<\/?span[^>]*>/gi, "\n\n");
210213
text = text.replaceAll(/\<\/?pre\>/gi, "\n```\n");
211214
text = text.replaceAll(/\<\/?var\>/gi, "`");
212215
text = text.replaceAll(/\<\/?ul\>/gi, "");
213216
text = text.replaceAll(/\<li\>/gi, "\n* ");
214-
text = text.replaceAll(/\<\/li\>/gi, "`");
217+
text = text.replaceAll(/\<\/li\>/gi, "");
215218
text = text.replaceAll(/\<\/?code\>/gi, "`");
216219
text = text.replaceAll(/\<\/Description>/gi, "");
217220
text = text.replaceAll(/\<example[^\>]*>/gi, "\n```\n");
@@ -231,7 +234,8 @@ function reshapeHTML(text) {
231234
text = text.replace(found, classLink);
232235
}
233236

234-
let result = "```" + text + "```\n\n";
237+
let result = `<div>${text}</div>\n\n`;
238+
// let result = "```" + text + "```\n\n";
235239
// const htmlValidate = new HtmlValidate();
236240
// let report = htmlValidate.validateStringSync(text);
237241
// if (!report.valid) {

versioned_docs/version-2024.2/intro.md

Whitespace-only changes.

versions.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
[
2-
"2024.2",
32
"2024.1"
43
]

0 commit comments

Comments
 (0)