fix: fix a bug where strike and underline can’t parsed together

This commit is contained in:
Philipp Kühn 2021-04-09 13:20:54 +02:00
parent e7fe7248af
commit eff2c4140a
2 changed files with 6 additions and 2 deletions

View File

@ -53,7 +53,9 @@ export const Strike = Mark.create<StrikeOptions>({
tag: 'strike',
},
{
style: 'text-decoration=line-through',
style: 'text-decoration',
consuming: false,
getAttrs: style => ((style as string).includes('line-through') ? {} : false),
},
]
},

View File

@ -38,7 +38,9 @@ export const Underline = Mark.create<UnderlineOptions>({
tag: 'u',
},
{
style: 'text-decoration=underline',
style: 'text-decoration',
consuming: false,
getAttrs: style => ((style as string).includes('underline') ? {} : false),
},
]
},