fix: Allow strikethrough of inline code (#5207
* fix: Allow strikethrough of inline code * Remove unneccessary change
This commit is contained in:
@@ -52,6 +52,31 @@ export default class ExtensionManager {
|
||||
);
|
||||
}
|
||||
|
||||
get marks() {
|
||||
const marks = this.extensions
|
||||
.filter((extension) => extension.type === "mark")
|
||||
.reduce(
|
||||
(marks, mark: Mark) => ({
|
||||
...marks,
|
||||
[mark.name]: mark.schema,
|
||||
}),
|
||||
{}
|
||||
);
|
||||
|
||||
for (const i in marks) {
|
||||
if (marks[i].excludes) {
|
||||
// We must filter marks from the excludes list that are not defined
|
||||
// in the schema for the current editor.
|
||||
marks[i].excludes = marks[i].excludes
|
||||
.split(" ")
|
||||
.filter((m: string) => Object.keys(marks).includes(m))
|
||||
.join(" ");
|
||||
}
|
||||
}
|
||||
|
||||
return marks;
|
||||
}
|
||||
|
||||
serializer() {
|
||||
const nodes = this.extensions
|
||||
.filter((extension) => extension.type === "node")
|
||||
@@ -104,18 +129,6 @@ export default class ExtensionManager {
|
||||
return new MarkdownParser(schema, makeRules({ rules, plugins }), tokens);
|
||||
}
|
||||
|
||||
get marks() {
|
||||
return this.extensions
|
||||
.filter((extension) => extension.type === "mark")
|
||||
.reduce(
|
||||
(marks, { name, schema }: Mark) => ({
|
||||
...marks,
|
||||
[name]: schema,
|
||||
}),
|
||||
{}
|
||||
);
|
||||
}
|
||||
|
||||
get plugins() {
|
||||
return this.extensions
|
||||
.filter((extension) => "plugins" in extension)
|
||||
|
||||
Reference in New Issue
Block a user