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

Commit

Permalink
Deprecate legacy convertFromHTMLToContentBlocks
Browse files Browse the repository at this point in the history
Summary: This diff renames `convertFromHTMLToContentBlocks` to `convertFromHTMLToContentBlocks_DEPRECATED` to formally declare it deprecated ahead of its removal, and give consumers a heads up that they ought to upgrade to `convertFromHTMLToContentBlocks2` and report back any issues with parsing HTML templates.

Reviewed By: mrkev

Differential Revision: D15844900

fbshipit-source-id: c7077f02627e82814f2429ec80f8a70b1e87aadc
  • Loading branch information
Claudio Procida authored and facebook-github-bot committed Jun 19, 2019
1 parent eddcc55 commit ceaeebf
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const gkx = require('gkx');

const convertFromHTML = gkx('draft_refactored_html_importer')
? require('convertFromHTMLToContentBlocks2')
: require('convertFromHTMLToContentBlocks');
: require('convertFromHTMLToContentBlocks_DEPRECATED');

type Props = any;
type State = any;
Expand Down
2 changes: 1 addition & 1 deletion src/Draft.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const gkx = require('gkx');

const convertFromHTML = gkx('draft_refactored_html_importer')
? require('convertFromHTMLToContentBlocks2')
: require('convertFromHTMLToContentBlocks');
: require('convertFromHTMLToContentBlocks_DEPRECATED');

const DraftPublic = {
Editor: DraftEditor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const ContentState = require('ContentState');
const EditorState = require('EditorState');
const SelectionState = require('SelectionState');

const convertFromHTMLToContentBlocks = require('convertFromHTMLToContentBlocks');
const convertFromHTMLToContentBlocks = require('convertFromHTMLToContentBlocks_DEPRECATED');
const editOnCompositionStart = require('editOnCompositionStart');
const {Map} = require('immutable');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jest.mock('generateRandomKey');

const DefaultDraftBlockRenderMap = require('DefaultDraftBlockRenderMap');

const convertFromHTMLToContentBlocks = require('convertFromHTMLToContentBlocks');
const convertFromHTMLToContentBlocks = require('convertFromHTMLToContentBlocks_DEPRECATED');
const cx = require('cx');
const getSafeBodyFromHTML = require('getSafeBodyFromHTML');

Expand Down
2 changes: 1 addition & 1 deletion src/model/paste/DraftPasteProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type {EntityMap} from 'EntityMap';
const ContentBlock = require('ContentBlock');
const ContentBlockNode = require('ContentBlockNode');

const convertFromHTMLToContentBlocksClassic = require('convertFromHTMLToContentBlocks');
const convertFromHTMLToContentBlocksClassic = require('convertFromHTMLToContentBlocks_DEPRECATED');
const convertFromHTMLToContentBlocksNew = require('convertFromHTMLToContentBlocks2');
const generateRandomKey = require('generateRandomKey');
const getSafeBodyFromHTML = require('getSafeBodyFromHTML');
Expand Down

0 comments on commit ceaeebf

Please sign in to comment.