wikilint 2.4.3 → 2.4.4

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.
@@ -21,17 +21,13 @@ class AstElement extends node_1.AstNode {
21
21
  normalize() {
22
22
  const childNodes = [...this.childNodes];
23
23
  for (let i = childNodes.length - 1; i >= 0; i--) {
24
- const { type, data } = childNodes[i], prev = childNodes[i - 1];
24
+ const { type, data } = childNodes[i];
25
25
  if (type !== 'text' || this.getGaps(i - 1)) {
26
26
  //
27
27
  }
28
28
  else if (data === '') {
29
29
  childNodes.splice(i, 1);
30
30
  }
31
- else if (prev?.type === 'text') {
32
- prev.setAttribute('data', prev.data + data);
33
- childNodes.splice(i, 1);
34
- }
35
31
  }
36
32
  this.setAttribute('childNodes', childNodes);
37
33
  }
package/dist/src/html.js CHANGED
@@ -65,11 +65,8 @@ class HtmlToken extends index_2.Token {
65
65
  }
66
66
  /** @override */
67
67
  text() {
68
- const { closing, name } = this, tag = `${this.#tag}${closing ? '' : super.text()}`, { html } = this.getAttribute('config');
69
- if (html[2].includes(name)) {
70
- return closing && name !== 'br' ? '' : `<${tag}>`;
71
- }
72
- return `<${closing ? '/' : ''}${tag}${this.#selfClosing && html[1].includes(name) ? '/' : ''}>`;
68
+ const { closing, } = this, tag = `${this.#tag}${closing ? '' : super.text()}`;
69
+ return `<${closing ? '/' : ''}${tag}${this.#selfClosing ? '/' : ''}>`;
73
70
  }
74
71
  /** @private */
75
72
  getAttribute(key) {
package/i18n/zh-hans.json CHANGED
@@ -21,6 +21,7 @@
21
21
  "HTML tag in table attributes": "表格属性中的HTML标签",
22
22
  "illegal attribute name": "非法的属性名",
23
23
  "illegal module name": "非法的模块名称",
24
+ "inconsistent table layout": "不一致的表格布局",
24
25
  "insecure style": "不安全的样式",
25
26
  "internal link in an external link": "外链中的内链",
26
27
  "invalid content in <$1>": "<$1>内的无效内容",
package/i18n/zh-hant.json CHANGED
@@ -21,6 +21,7 @@
21
21
  "HTML tag in table attributes": "表格屬性中的HTML標籤",
22
22
  "illegal attribute name": "非法的屬性名",
23
23
  "illegal module name": "非法的模組名稱",
24
+ "inconsistent table layout": "不一致的表格佈局",
24
25
  "insecure style": "不安全的樣式",
25
26
  "internal link in an external link": "外部連結中的內部連結",
26
27
  "invalid content in <$1>": "<$1>內的無效內容",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wikilint",
3
- "version": "2.4.3",
3
+ "version": "2.4.4",
4
4
  "description": "A Node.js linter for MediaWiki markup",
5
5
  "keywords": [
6
6
  "mediawiki",
@@ -35,7 +35,7 @@
35
35
  "declaration": "grep -rl --include='*.d.ts' '@private' dist/ | xargs bash sed.sh -i -E '/^\\s+\\/\\*\\* @private/,+1d'; node ./dist/bin/declaration.js",
36
36
  "prepublishOnly": "npm run build && rm dist/internal.js dist/base.js dist/[bmpu]*/*.d.ts",
37
37
  "build": "bash build.sh",
38
- "diff": "git diff --ignore-all-space --color-moved",
38
+ "diff": "bash diff.sh",
39
39
  "diff:stat": "f() { git diff --stat --ignore-all-space --color=always $1 $2 -- . ':!extensions/' ':!bin/' | grep '\\.ts'; }; f",
40
40
  "lint:ts": "tsc --noEmit && eslint --cache .",
41
41
  "lint:json": "ajv -s config/.schema.json -d 'config/*.json' --strict=true --strict-required=false",