Skip to content
This repository was archived by the owner on May 19, 2020. It is now read-only.

Commit 7a2f2b4

Browse files
committed
fix(schema): support softbreaks in lists - I187
Signed-off-by: irmerk <[email protected]>
1 parent e17eda2 commit 7a2f2b4

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,4 @@
112112
"slate-plain-serializer": "^0.7.10",
113113
"style-loader": "^0.23.1"
114114
}
115-
}
115+
}

src/schema.js

+15-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,21 @@ const schema = {
8686
},
8787
list_item: {
8888
parent: [{ type: 'ol_list' }, { type: 'ul_list' }],
89-
nodes: [{ match: [{ object: 'text' }, { type: 'link' }] }],
90-
marks: [{ type: 'bold' }, { type: 'italic' }, { type: 'code' }],
89+
nodes: [
90+
{
91+
match: [
92+
{ object: 'text' },
93+
{ type: 'link' },
94+
{ type: 'paragraph' },
95+
{ type: 'softbreak' }
96+
]
97+
}
98+
],
99+
marks: [
100+
{ type: 'bold' },
101+
{ type: 'italic' },
102+
{ type: 'code' }
103+
],
91104
},
92105
},
93106
};

0 commit comments

Comments
 (0)