Skip to content

Commit

Permalink
Raw handling: update strikethrough (#14430)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix authored and youknowriad committed Mar 20, 2019
1 parent f337b92 commit 064d505
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function( node, doc ) {
}

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

if ( verticalAlign === 'super' ) {
Expand Down
3 changes: 2 additions & 1 deletion packages/blocks/src/api/raw-handling/phrasing-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { omit } from 'lodash';
const phrasingContentSchema = {
strong: {},
em: {},
s: {},
del: {},
ins: {},
a: { attributes: [ 'href', 'target', 'rel' ] },
Expand All @@ -20,7 +21,7 @@ const phrasingContentSchema = {
// Recursion is needed.
// Possible: strong > em > strong.
// Impossible: strong > strong.
[ 'strong', 'em', 'del', 'ins', 'a', 'code', 'abbr', 'sub', 'sup' ].forEach( ( tag ) => {
[ 'strong', 'em', 's', 'del', 'ins', 'a', 'code', 'abbr', 'sub', 'sup' ].forEach( ( tag ) => {
phrasingContentSchema[ tag ].children = omit( phrasingContentSchema, tag );
} );

Expand Down

0 comments on commit 064d505

Please sign in to comment.