Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Raw handling: update strikethrough
  • Loading branch information
ellatrix committed Mar 14, 2019
commit 90e9edc45114e5e0178a4f95c68485169b90a269
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