@pixui-dev/pixui-richtext-helper 0.2.15 → 0.2.16

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.
@@ -389,7 +389,7 @@ var RichTextCore = /** @class */ (function () {
389
389
  */
390
390
  RichTextCore.processSegment = function (segmentHtml, config) {
391
391
  var $ = cheerio.load(segmentHtml, null, false);
392
- // 预处理:data-list → class、class → style、标题后补 <br>、margin→padding 合并
392
+ // 预处理:data-list → class、class → stylemargin→padding 合并
393
393
  this.preprocess($);
394
394
  // 规范图片尺寸单位:img 的 width/height 数字补 px
395
395
  this.fixImgSizeUnit($);
@@ -497,14 +497,6 @@ var RichTextCore = /** @class */ (function () {
497
497
  }
498
498
  }
499
499
  });
500
- // 在所有标题标签后插入换行 <br>
501
- $("h1, h2, h3, h4, h5, h6").each(function () {
502
- // 若标题后紧跟已有换行则不再追加
503
- var next = $(this).next();
504
- if (!next.is("br")) {
505
- $(this).after("<br>");
506
- }
507
- });
508
500
  // 将所有的margin-left,margin-right转换为padding-left,padding-right
509
501
  $("*").each(function () {
510
502
  var oriStyle = $(this).attr("style") || "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixui-dev/pixui-richtext-helper",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "description": "pixui richtext helper",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,4 +24,4 @@
24
24
  "dependencies": {
25
25
  "cheerio": "1.0.0-rc.10"
26
26
  }
27
- }
27
+ }