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*$/;
5
5
export const inlineMatchers = {
6
6
BOLD : [ / \* ( .+ ) \* $ / g] ,
7
7
ITALIC : [ / _ ( .+ ) _ $ / g] ,
8
- CODE : [ / ` ( . + ) ` $ / g] ,
9
- STRIKETHROUGH : [ / ~ ~ ( .+ ) ~ ~ $ / g] ,
8
+ CODE : [ / ` ( [ ^ ` ] + ) ` $ / g] ,
9
+ STRIKETHROUGH : [ / ~ ( .+ ) ~ $ / g] ,
10
10
} ;
11
11
12
12
export const CODE_BLOCK_TYPE = "code-block" ;
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ describe("handleInlineStyle", () => {
54
54
blocks : [
55
55
{
56
56
key : "item1" ,
57
- text : "`h~~ el*lo _inline~ ~_* style" ,
57
+ text : "`h~el*lo _inline~_* style" ,
58
58
type : "unstyled" ,
59
59
depth : 0 ,
60
60
inlineStyleRanges : [ ] ,
@@ -100,9 +100,9 @@ describe("handleInlineStyle", () => {
100
100
} ,
101
101
selection : new SelectionState ( {
102
102
anchorKey : "item1" ,
103
- anchorOffset : 21 ,
103
+ anchorOffset : 19 ,
104
104
focusKey : "item1" ,
105
- focusOffset : 21 ,
105
+ focusOffset : 19 ,
106
106
isBackward : false ,
107
107
hasFocus : true ,
108
108
} ) ,
@@ -351,7 +351,7 @@ describe("handleInlineStyle", () => {
351
351
blocks : [
352
352
{
353
353
key : "item1" ,
354
- text : "hello ~~ inline~ style" ,
354
+ text : "hello ~inline style" ,
355
355
type : "unstyled" ,
356
356
depth : 0 ,
357
357
inlineStyleRanges : [ ] ,
@@ -382,9 +382,9 @@ describe("handleInlineStyle", () => {
382
382
} ,
383
383
selection : new SelectionState ( {
384
384
anchorKey : "item1" ,
385
- anchorOffset : 15 ,
385
+ anchorOffset : 13 ,
386
386
focusKey : "item1" ,
387
- focusOffset : 15 ,
387
+ focusOffset : 13 ,
388
388
isBackward : false ,
389
389
hasFocus : true ,
390
390
} ) ,
You can’t perform that action at this time.
0 commit comments