Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
Finish modernizing convertFromHTMLToContentBlocks - max nesting bug fix
Browse files Browse the repository at this point in the history
Summary:
The old convertFromHTMLToContentBlocks is capping depth to 4, v2 doesn't cap the depth.
DraftEditorContents-core component didn't handle cases of depth bigger then 4.
Similar to the current UI behavior, depth bigger then 4 will be shown as the same depth of 4.

Reviewed By: flarnie

Differential Revision: D7816688

fbshipit-source-id: 8989f0c5fb03bfcffc1e50575e35986d2491c3c2
  • Loading branch information
NoamELB authored and facebook-github-bot committed May 2, 2018
1 parent d24b802 commit 06c0ee6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/component/contents/DraftEditorContents-core.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const getListItemClasses = (
'public/DraftStyleDefault/depth1': depth === 1,
'public/DraftStyleDefault/depth2': depth === 2,
'public/DraftStyleDefault/depth3': depth === 3,
'public/DraftStyleDefault/depth4': depth === 4,
'public/DraftStyleDefault/depth4': depth >= 4,
'public/DraftStyleDefault/listLTR': direction === 'LTR',
'public/DraftStyleDefault/listRTL': direction === 'RTL',
});
Expand Down

0 comments on commit 06c0ee6

Please sign in to comment.