Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Apr 2, 2019
1 parent abe22b6 commit 4e7888d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/rich-text/src/get-active-formats.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export function getActiveFormats( { formats, start, end, activeFormats } ) {
const formatsBefore = formats[ start - 1 ] || [];
const formatsAfter = formats[ start ] || [];

// By default, select the lowest amount of formats possible (which means
// the caret is positioned outside the format boundary). The user can
// then use arrow keys to define `activeFormats`.
if ( formatsBefore.length < formatsAfter.length ) {
return formatsBefore;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/rich-text/src/normalise-formats.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import { isFormatEqual } from './is-format-equal';

/**
* Normalises formats: ensures subsequent equal formats have the same reference.
* Normalises formats: ensures subsequent adjacent equal formats have the same
* reference.
*
* @param {Object} value Value to normalise formats of.
*
Expand Down

0 comments on commit 4e7888d

Please sign in to comment.