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

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.
@@ -132,6 +132,7 @@ var mergeStyles = function () {
132
132
  var CLASS_STYLE_MAP = {
133
133
  "ql-direction-rtl": function (old) { return mergeStyles(old, "direction: rtl;"); },
134
134
  "ql-align-right": function (old) { return mergeStyles(old, "text-align: right;"); },
135
+ "ql-align-center": function (old) { return mergeStyles(old, "text-align: center;"); },
135
136
  };
136
137
  // data-list value → 需追加的 class 名
137
138
  var DATA_LIST_CLASS_MAP = {
@@ -389,7 +390,7 @@ var RichTextCore = /** @class */ (function () {
389
390
  */
390
391
  RichTextCore.processSegment = function (segmentHtml, config) {
391
392
  var $ = cheerio.load(segmentHtml, null, false);
392
- // 预处理:data-list → class、class → style、标题后补 <br>、margin→padding 合并
393
+ // 预处理:data-list → class、class → stylemargin→padding 合并
393
394
  this.preprocess($);
394
395
  // 规范图片尺寸单位:img 的 width/height 数字补 px
395
396
  this.fixImgSizeUnit($);
@@ -497,14 +498,6 @@ var RichTextCore = /** @class */ (function () {
497
498
  }
498
499
  }
499
500
  });
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
501
  // 将所有的margin-left,margin-right转换为padding-left,padding-right
509
502
  $("*").each(function () {
510
503
  var oriStyle = $(this).attr("style") || "";
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const LIB_VERSION = "0.2.15";
1
+ export declare const LIB_VERSION = "0.2.17";
package/dist/version.js CHANGED
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LIB_VERSION = void 0;
4
4
  /* Auto-generated by scripts/generate-version.js */
5
- exports.LIB_VERSION = "0.2.15";
5
+ exports.LIB_VERSION = "0.2.17";
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.17",
4
4
  "description": "pixui richtext helper",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",