@tiptap/core 2.0.0-beta.167 → 2.0.0-beta.168

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/core",
3
3
  "description": "headless rich text editor",
4
- "version": "2.0.0-beta.167",
4
+ "version": "2.0.0-beta.168",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -45,5 +45,5 @@
45
45
  "directory": "packages/core"
46
46
  },
47
47
  "sideEffects": false,
48
- "gitHead": "82759a898a77aa0bf6a459178021e86b6713ef39"
48
+ "gitHead": "31efb0802e77e32c8c1b65e1a8456a5d3262b0ae"
49
49
  }
@@ -25,26 +25,20 @@ export function injectExtensionAttributesToParseRule(parseRule: ParseRule, exten
25
25
  return false
26
26
  }
27
27
 
28
- const newAttributes = extensionAttributes
29
- .filter(item => item.attribute.rendered)
30
- .reduce((items, item) => {
31
- const value = item.attribute.parseHTML
32
- ? item.attribute.parseHTML(node as HTMLElement)
33
- : fromString((node as HTMLElement).getAttribute(item.name))
34
-
35
- if (isObject(value)) {
36
- console.warn(`[tiptap warn]: BREAKING CHANGE: "parseHTML" for your attribute "${item.name}" returns an object but should return the value itself. If this is expected you can ignore this message. This warning will be removed in one of the next releases. Further information: https://github.com/ueberdosis/tiptap/issues/1863`)
37
- }
38
-
39
- if (value === null || value === undefined) {
40
- return items
41
- }
42
-
43
- return {
44
- ...items,
45
- [item.name]: value,
46
- }
47
- }, {})
28
+ const newAttributes = extensionAttributes.reduce((items, item) => {
29
+ const value = item.attribute.parseHTML
30
+ ? item.attribute.parseHTML(node as HTMLElement)
31
+ : fromString((node as HTMLElement).getAttribute(item.name))
32
+
33
+ if (value === null || value === undefined) {
34
+ return items
35
+ }
36
+
37
+ return {
38
+ ...items,
39
+ [item.name]: value,
40
+ }
41
+ }, {})
48
42
 
49
43
  return { ...oldAttributes, ...newAttributes }
50
44
  },