Skip to content

Commit 064d505

Browse files
ellatrixyouknowriad
authored andcommitted
Raw handling: update strikethrough (#14430)
1 parent f337b92 commit 064d505

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/blocks/src/api/raw-handling/phrasing-content-reducer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function( node, doc ) {
2323
}
2424

2525
if ( textDecorationLine === 'line-through' ) {
26-
wrap( doc.createElement( 'del' ), node );
26+
wrap( doc.createElement( 's' ), node );
2727
}
2828

2929
if ( verticalAlign === 'super' ) {

packages/blocks/src/api/raw-handling/phrasing-content.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { omit } from 'lodash';
66
const phrasingContentSchema = {
77
strong: {},
88
em: {},
9+
s: {},
910
del: {},
1011
ins: {},
1112
a: { attributes: [ 'href', 'target', 'rel' ] },
@@ -20,7 +21,7 @@ const phrasingContentSchema = {
2021
// Recursion is needed.
2122
// Possible: strong > em > strong.
2223
// Impossible: strong > strong.
23-
[ 'strong', 'em', 'del', 'ins', 'a', 'code', 'abbr', 'sub', 'sup' ].forEach( ( tag ) => {
24+
[ 'strong', 'em', 's', 'del', 'ins', 'a', 'code', 'abbr', 'sub', 'sup' ].forEach( ( tag ) => {
2425
phrasingContentSchema[ tag ].children = omit( phrasingContentSchema, tag );
2526
} );
2627

0 commit comments

Comments
 (0)