@@ -203,15 +203,18 @@ function reshapeHTML(text) {
203
203
text = text . join ( " " ) ;
204
204
}
205
205
text = text . replaceAll ( / < [ ^ > ] * > / gi, "" ) ;
206
- text = text . replaceAll ( / ( { | } | \[ | \] ) / g, "\\$1" ) ;
206
+ text = text . replaceAll ( "{" , "{" ) ;
207
+ text = text . replaceAll ( "}" , "}" ) ;
208
+ // text = text.replaceAll(/({|}|\[|\])/g, "\\$1");
207
209
208
- text = text . replaceAll ( / \< b r \s * \/ ? \> / gi, "\n\n" ) ;
209
- text = text . replaceAll ( / \< \/ ? p \> / gi, "\n\n" ) ;
210
+ text = text . replaceAll ( / \< b r \s * \/ ? \> / gi, "<br />" ) ;
211
+ text = text . replaceAll ( / < \/ ? p [ ^ > ] * > / gi, "\n\n" ) ;
212
+ text = text . replaceAll ( / < \/ ? s p a n [ ^ > ] * > / gi, "\n\n" ) ;
210
213
text = text . replaceAll ( / \< \/ ? p r e \> / gi, "\n```\n" ) ;
211
214
text = text . replaceAll ( / \< \/ ? v a r \> / gi, "`" ) ;
212
215
text = text . replaceAll ( / \< \/ ? u l \> / gi, "" ) ;
213
216
text = text . replaceAll ( / \< l i \> / gi, "\n* " ) ;
214
- text = text . replaceAll ( / \< \/ l i \> / gi, "` " ) ;
217
+ text = text . replaceAll ( / \< \/ l i \> / gi, "" ) ;
215
218
text = text . replaceAll ( / \< \/ ? c o d e \> / gi, "`" ) ;
216
219
text = text . replaceAll ( / \< \/ D e s c r i p t i o n > / gi, "" ) ;
217
220
text = text . replaceAll ( / \< e x a m p l e [ ^ \> ] * > / gi, "\n```\n" ) ;
@@ -231,7 +234,8 @@ function reshapeHTML(text) {
231
234
text = text . replace ( found , classLink ) ;
232
235
}
233
236
234
- let result = "```" + text + "```\n\n" ;
237
+ let result = `<div>${ text } </div>\n\n` ;
238
+ // let result = "```" + text + "```\n\n";
235
239
// const htmlValidate = new HtmlValidate();
236
240
// let report = htmlValidate.validateStringSync(text);
237
241
// if (!report.valid) {
0 commit comments