Skip to content

Commit

Permalink
Call ProcessNodeDefinitions without argument
Browse files Browse the repository at this point in the history
Signed-off-by: Arve Knudsen <[email protected]>
  • Loading branch information
aknuds1 committed Jun 3, 2023
1 parent e8f6ced commit ffb3367
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const isValidNode = function () {
};

// Order matters. Instructions are processed in the order they're defined
const processNodeDefinitions = new HtmlToReact.ProcessNodeDefinitions(React);
const processNodeDefinitions = new HtmlToReact.ProcessNodeDefinitions();
const processingInstructions = [
{
// Custom <h1> processing
Expand Down Expand Up @@ -158,7 +158,7 @@ const isValidNode = function () {
return true;
};

const processNodeDefinitions = new HtmlToReact.ProcessNodeDefinitions(React);
const processNodeDefinitions = new HtmlToReact.ProcessNodeDefinitions();

// Order matters. Instructions are processed in
// the order they're defined
Expand Down Expand Up @@ -261,7 +261,7 @@ const preprocessingInstructions = [
},
}
];
const processNodeDefinitions = new HtmlToReact.ProcessNodeDefinitions(React);
const processNodeDefinitions = new HtmlToReact.ProcessNodeDefinitions();
const processingInstructions = [
{
shouldProcessNode: function (node) {
Expand Down
2 changes: 1 addition & 1 deletion test/html-to-react-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ describe('Html2React', () => {

describe('with custom processing instructions', () => {
const parser = new Parser();
const processNodeDefinitions = new ProcessNodeDefinitions(React);
const processNodeDefinitions = new ProcessNodeDefinitions();

describe('parse valid HTML', () => {
it('should return nothing with only a single <p> element', () => {
Expand Down

0 comments on commit ffb3367

Please sign in to comment.