Skip to content

Commit

Permalink
Output the class attribute correctly in HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Dec 4, 2024
1 parent c9e054a commit 71312e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/format-library/src/link/inline.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ function InlineLinkUI( {
opensInNewTab: activeAttributes.target === '_blank',
nofollow: activeAttributes.rel?.includes( 'nofollow' ),
title: richTextText,
cssClasses: activeAttributes.className,
cssClasses: activeAttributes.class,
} ),
[
activeAttributes.className,
activeAttributes.class,
activeAttributes.id,
activeAttributes.rel,
activeAttributes.target,
Expand Down
2 changes: 1 addition & 1 deletion packages/format-library/src/link/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function createLinkFormat( {
const trimmedCssClasses = cssClasses?.trim();

if ( trimmedCssClasses?.length ) {
format.attributes.className = trimmedCssClasses;
format.attributes.class = trimmedCssClasses;
}

return format;
Expand Down

0 comments on commit 71312e3

Please sign in to comment.