Skip to content

Commit 204acd1

Browse files
committed
Merge remote-tracking branch 'elbakerino/master' into develop
2 parents bdb4acb + 6f3092b commit 204acd1

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ demo/public
4242
test-results.xml
4343
.node-version
4444
yarn.lock
45+
package-lock.json

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build:demo": "NODE_ENV=production npx webpack --config demo/webpack.config.prod.js && rm -rf demo/public/css && cp -R demo/publicTemplate/* demo/public/",
1010
"build:js": "BABEL_DISABLE_CACHE=1 BABEL_ENV=production NODE_ENV=production node_modules/.bin/babel --out-dir='lib' --ignore='**/__test__/*' src",
1111
"clean": "node_modules/.bin/rimraf lib; node_modules/.bin/rimraf demo/public",
12-
"deploy:demo": ".circleci/deploy-demo.sh",
12+
"prepare": "npm run build",
1313
"prepublish": "npm run build",
1414
"start": "npm run start:dev",
1515
"start:dev": "node_modules/.bin/babel-node ./demo/server.js",
@@ -97,9 +97,9 @@
9797
"webpack-hot-middleware": "^2.13.2"
9898
},
9999
"peerDependencies": {
100-
"draft-js-plugins-editor": "^2.0.0 || ~2.0.0-rc.1 || 2.0.0-rc2 || 2.0.0-rc1 || 2.0.0-beta12",
101-
"react": "^16.0.0 || ^15.0.0",
102-
"react-dom": "^16.0.0 || ^15.0.0"
100+
"draft-js-plugins-editor": "^3.0.0",
101+
"react": "^16.0.0",
102+
"react-dom": "^16.0.0"
103103
},
104104
"contributors": ["Atsushi Nagase <a@ngs.io>"],
105105
"dependencies": {

src/__test__/plugin-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ describe('draft-js-markdown-shortcuts-plugin', () => {
322322
let character;
323323
beforeEach(() => {
324324
character = ' ';
325-
subject = () => plugin.handleBeforeInput(character, store.getEditorState(), store);
325+
subject = () => plugin.handleBeforeInput(character, store.getEditorState(), new Date().getTime(), store);
326326
});
327327
['handleBlockType', 'handleImage', 'handleLink', 'handleInlineStyle'].forEach(modifier => {
328328
describe(modifier, () => {

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ const createMarkdownShortcutsPlugin = (config = { insertEmptyBlockOnReturnWithMo
137137
}
138138
return 'not-handled';
139139
},
140-
handleBeforeInput(character, editorState, { setEditorState }) {
140+
handleBeforeInput(character, editorState, eventTimeStamp, { setEditorState }) {
141141
if (character.match(/[A-z0-9_*~`]/)) {
142142
return 'not-handled';
143143
}

0 commit comments

Comments
 (0)