prosemirror-schema-basic 1.2.3 → 1.2.5

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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## 1.2.5 (2026-09-25)
2
+
3
+ ### Bug fixes
4
+
5
+ Make sure that, even if an attacker manages to smuggle a string in a heading's `level` attribute, they cannot inject arbitrary tag names.
6
+
7
+ ## 1.2.4 (2025-03-18)
8
+
9
+ ### Bug fixes
10
+
11
+ Add a `code` flag to the code mark.
12
+
1
13
  ## 1.2.3 (2024-07-14)
2
14
 
3
15
  ### Bug fixes
package/CONTRIBUTING.md CHANGED
@@ -12,7 +12,7 @@ Community discussion, questions, and informal bug reporting is done on the
12
12
  ## Submitting bug reports
13
13
 
14
14
  Report bugs on the
15
- [GitHub issue tracker](http://github.com/prosemirror/prosemirror/issues).
15
+ [issue tracker](https://code.haverbeke.berlin/prosemirror/prosemirror/issues).
16
16
  Before reporting a bug, please read these pointers.
17
17
 
18
18
  - The issue tracker is for *bugs*, not requests for help. Questions
@@ -34,21 +34,28 @@ Before reporting a bug, please read these pointers.
34
34
 
35
35
  ## Contributing code
36
36
 
37
- - Make sure you have a [GitHub Account](https://github.com/signup/free)
37
+ Code generated by a language model is not welcome in this project.
38
+ Please don't waste my time with it.
38
39
 
39
- - Fork the relevant repository
40
- ([how to fork a repo](https://help.github.com/articles/fork-a-repo))
40
+ If you want to make a change that involves a significant overhaul of
41
+ the code or introduces a user-visible new feature, create an
42
+ [issue](https://code.haverbeke.berlin/prosemirror/prosemirror/issues/)
43
+ first with your proposal.
44
+
45
+ - Make sure you have a [Codeberg](https://codeberg.org/user/sign_up)
46
+ or [GitHub](https://github.com/signup/free) account.
47
+
48
+ - Use that to create a [code.haverbeke.berlin
49
+ account](https://code.haverbeke.berlin/user/login).
50
+
51
+ - Fork the relevant repository.
41
52
 
42
53
  - Create a local checkout of the code. You can use the
43
- [main repository](https://github.com/prosemirror/prosemirror) to
54
+ [main repository](https://code.haverbeke.berlin/prosemirror/prosemirror) to
44
55
  easily check out all core modules.
45
56
 
46
57
  - Make your changes, and commit them
47
58
 
48
- - Follow the code style of the rest of the project (see below). Run
49
- `npm run lint` (in the main repository checkout) to make sure that
50
- the linter is happy.
51
-
52
59
  - If your changes are easy to test or likely to regress, add tests in
53
60
  the relevant `test/` directory. Either put them in an existing
54
61
  `test-*.js` file, if they fit there, or add a new file.
@@ -56,13 +63,13 @@ Before reporting a bug, please read these pointers.
56
63
  - Make sure all tests pass. Run `npm run test` to verify tests pass
57
64
  (you will need Node.js v6+).
58
65
 
59
- - Submit a pull request ([how to create a pull request](https://help.github.com/articles/fork-a-repo)).
60
- Don't put more than one feature/fix in a single pull request.
66
+ - Submit a pull request. Don't put more than one feature/fix in a
67
+ single pull request.
61
68
 
62
69
  By contributing code to ProseMirror you
63
70
 
64
71
  - Agree to license the contributed code under the project's [MIT
65
- license](https://github.com/ProseMirror/prosemirror/blob/master/LICENSE).
72
+ license](https://code.haverbeke.berlin/prosemirror/prosemirror/blob/main/LICENSE).
66
73
 
67
74
  - Confirm that you have the right to contribute and license the code
68
75
  in question. (Either you hold all rights on the code, or the rights
@@ -82,19 +89,16 @@ By contributing code to ProseMirror you
82
89
  - Follow the surrounding code when it comes to spacing, brace
83
90
  placement, etc.
84
91
 
85
- - Brace-less single-statement bodies are encouraged (whenever they
86
- don't impact readability).
92
+ - Brace-less single-statement bodies are encouraged whenever they
93
+ don't impact readability.
87
94
 
88
- - [getdocs](https://github.com/marijnh/getdocs)-style doc comments
95
+ - [getdocs-ts](https://code.haverbeke.berlin/marijn/getdocs-ts)-style doc comments
89
96
  above items that are part of the public API.
90
97
 
91
98
  - When documenting non-public items, you can put the type after a
92
99
  single colon, so that getdocs doesn't pick it up and add it to the
93
100
  API reference.
94
101
 
95
- - The linter (`npm run lint`) complains about unused variables and
96
- functions. Prefix their names with an underscore to muffle it.
97
-
98
102
  - ProseMirror does *not* follow JSHint or JSLint prescribed style.
99
103
  Patches that try to 'fix' code to pass one of these linters will not
100
104
  be accepted.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # prosemirror-schema-basic
2
2
 
3
- [ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-schema-basic/blob/master/CHANGELOG.md) ]
3
+ [ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://code.haverbeke.berlin/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**CHANGELOG**](https://code.haverbeke.berlin/prosemirror/prosemirror-schema-basic/src/branch/main/CHANGELOG.md) ]
4
4
 
5
5
  This is a [schema module](https://prosemirror.net/docs/ref/#schema-basic) for [ProseMirror](https://prosemirror.net).
6
6
  ProseMirror is a well-behaved rich semantic content editor based on
@@ -16,10 +16,10 @@ number of [examples](https://prosemirror.net/examples/) and the
16
16
  [documentation](https://prosemirror.net/docs/).
17
17
 
18
18
  This code is released under an
19
- [MIT license](https://github.com/prosemirror/prosemirror/tree/master/LICENSE).
19
+ [MIT license](https://code.haverbeke.berlin/prosemirror/prosemirror/src/branch/main/LICENSE).
20
20
  There's a [forum](http://discuss.prosemirror.net) for general
21
21
  discussion and support requests, and the
22
- [Github bug tracker](https://github.com/prosemirror/prosemirror/issues)
22
+ [bug tracker](https://code.haverbeke.berlin/prosemirror/prosemirror/issues)
23
23
  is the place to report issues.
24
24
 
25
25
  We aim to be an inclusive, welcoming community. To make that explicit,
package/dist/index.cjs CHANGED
@@ -82,7 +82,7 @@ var nodes = {
82
82
  }
83
83
  }],
84
84
  toDOM: function toDOM(node) {
85
- return ["h" + node.attrs.level, 0];
85
+ return ["h" + +node.attrs.level, 0];
86
86
  }
87
87
  },
88
88
  code_block: {
@@ -228,6 +228,7 @@ var marks = {
228
228
  }
229
229
  },
230
230
  code: {
231
+ code: true,
231
232
  parseDOM: [{
232
233
  tag: "code"
233
234
  }],
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { NodeSpec, MarkSpec, Schema } from 'prosemirror-model';
1
+ import { MarkSpec, NodeSpec, Schema } from 'prosemirror-model';
2
2
 
3
3
  /**
4
4
  [Specs](https://prosemirror.net/docs/ref/#model.NodeSpec) for the nodes defined in this schema.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { NodeSpec, MarkSpec, Schema } from 'prosemirror-model';
1
+ import { MarkSpec, NodeSpec, Schema } from 'prosemirror-model';
2
2
 
3
3
  /**
4
4
  [Specs](https://prosemirror.net/docs/ref/#model.NodeSpec) for the nodes defined in this schema.
package/dist/index.js CHANGED
@@ -55,7 +55,7 @@ const nodes = {
55
55
  { tag: "h4", attrs: { level: 4 } },
56
56
  { tag: "h5", attrs: { level: 5 } },
57
57
  { tag: "h6", attrs: { level: 6 } }],
58
- toDOM(node) { return ["h" + node.attrs.level, 0]; }
58
+ toDOM(node) { return ["h" + +node.attrs.level, 0]; }
59
59
  },
60
60
  /**
61
61
  A code listing. Disallows marks or non-text inline
@@ -164,6 +164,7 @@ const marks = {
164
164
  Code font mark. Represented as a `<code>` element.
165
165
  */
166
166
  code: {
167
+ code: true,
167
168
  parseDOM: [{ tag: "code" }],
168
169
  toDOM() { return codeDOM; }
169
170
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prosemirror-schema-basic",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Basic schema elements for ProseMirror",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -21,10 +21,10 @@
21
21
  ],
22
22
  "repository": {
23
23
  "type": "git",
24
- "url": "git://github.com/prosemirror/prosemirror-schema-basic.git"
24
+ "url": "git+https://code.haverbeke.berlin/prosemirror/prosemirror-schema-basic.git"
25
25
  },
26
26
  "dependencies": {
27
- "prosemirror-model": "^1.19.0"
27
+ "prosemirror-model": "^1.25.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@prosemirror/buildhelper": "^0.1.5",
@@ -50,7 +50,7 @@ export const nodes = {
50
50
  {tag: "h4", attrs: {level: 4}},
51
51
  {tag: "h5", attrs: {level: 5}},
52
52
  {tag: "h6", attrs: {level: 6}}],
53
- toDOM(node) { return ["h" + node.attrs.level, 0] }
53
+ toDOM(node) { return ["h" + +node.attrs.level, 0] }
54
54
  } as NodeSpec,
55
55
 
56
56
  /// A code listing. Disallows marks or non-text inline
@@ -150,6 +150,7 @@ export const marks = {
150
150
 
151
151
  /// Code font mark. Represented as a `<code>` element.
152
152
  code: {
153
+ code: true,
153
154
  parseDOM: [{tag: "code"}],
154
155
  toDOM() { return codeDOM }
155
156
  } as MarkSpec