This repository was archived by the owner on Oct 11, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ export const CODE_BLOCK_REGEX = /^```([\w-]+)?\s*$/;
55export const inlineMatchers = {
66 BOLD : [ / \* ( .+ ) \* $ / g] ,
77 ITALIC : [ / _ ( .+ ) _ $ / g] ,
8- CODE : [ / ` ( . + ) ` $ / g] ,
9- STRIKETHROUGH : [ / ~ ~ ( .+ ) ~ ~ $ / g] ,
8+ CODE : [ / ` ( [ ^ ` ] + ) ` $ / g] ,
9+ STRIKETHROUGH : [ / ~ ( .+ ) ~ $ / g] ,
1010} ;
1111
1212export const CODE_BLOCK_TYPE = "code-block" ;
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ describe("handleInlineStyle", () => {
5454 blocks : [
5555 {
5656 key : "item1" ,
57- text : "`h~~ el*lo _inline~ ~_* style" ,
57+ text : "`h~el*lo _inline~_* style" ,
5858 type : "unstyled" ,
5959 depth : 0 ,
6060 inlineStyleRanges : [ ] ,
@@ -100,9 +100,9 @@ describe("handleInlineStyle", () => {
100100 } ,
101101 selection : new SelectionState ( {
102102 anchorKey : "item1" ,
103- anchorOffset : 21 ,
103+ anchorOffset : 19 ,
104104 focusKey : "item1" ,
105- focusOffset : 21 ,
105+ focusOffset : 19 ,
106106 isBackward : false ,
107107 hasFocus : true ,
108108 } ) ,
@@ -351,7 +351,7 @@ describe("handleInlineStyle", () => {
351351 blocks : [
352352 {
353353 key : "item1" ,
354- text : "hello ~~ inline~ style" ,
354+ text : "hello ~inline style" ,
355355 type : "unstyled" ,
356356 depth : 0 ,
357357 inlineStyleRanges : [ ] ,
@@ -382,9 +382,9 @@ describe("handleInlineStyle", () => {
382382 } ,
383383 selection : new SelectionState ( {
384384 anchorKey : "item1" ,
385- anchorOffset : 15 ,
385+ anchorOffset : 13 ,
386386 focusKey : "item1" ,
387- focusOffset : 15 ,
387+ focusOffset : 13 ,
388388 isBackward : false ,
389389 hasFocus : true ,
390390 } ) ,
You can’t perform that action at this time.
0 commit comments