Skip to content

Commit b2fb0b9

Browse files
author
Zaydek Michels-Gualtieri
committed
Better comments
1 parent e136c7d commit b2fb0b9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/Editor/model/Editor/InlineElement.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
import { immerable } from "immer"
22

3-
// Describes an inline element, such as plaintext or rich
4-
// text. An inline element is considered discerete when
5-
// types and props are not equal.
3+
// Describes an inline element; an inline element is a
4+
// representation of zero-to-many nested inline elements,
5+
// such as plaintext or <strong><em>.
6+
//
7+
// Note that there is only one correct representation of an
8+
// inline element because types are sortable.
9+
//
610
class InlineElement {
711
[immerable] = true
812

913
// Zero-to-many types.
1014
types = []
15+
1116
// Zero-to-many props.
1217
props = {}
18+
1319
// Character data.
1420
value = ""
1521

0 commit comments

Comments
 (0)