File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
scripts/validation/domain Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -152,10 +152,11 @@ export class Article {
152
152
if ( this . _emphasizedTextData ) return this . _emphasizedTextData ;
153
153
154
154
let data = new Array ( ) ;
155
- const italicRegex1 = new RegExp ( / (?< = \W ) (?< ! \* ) \* (?< text > [ ^ \* ] + ?) \* (? ! \* ) / , "g" ) ;
156
- const italicRegex2 = new RegExp ( / (?< = \W ) (?< ! _ ) _ (?< text > [ ^ _ ] + ?) _ (? ! _ ) / , "g" ) ;
157
- const boldRegex1 = new RegExp ( / (?< = \W ) (?< ! \* ) \* \* (?< text > [ ^ \* \* ] + ?) \* \* (? ! \* ) / , "g" ) ;
158
- const boldRegex2 = new RegExp ( / (?< = \W ) (?< ! _ ) _ _ (?< text > [ ^ _ _ ] + ?) _ _ (? ! _ ) / , "g" ) ;
155
+ const italicRegex1 = new RegExp ( / \B \* (?< text > [ ^ \n \* ] + ?) \* (? ! \* ) \B / , "g" ) ;
156
+ const italicRegex2 = new RegExp ( / \b _ (?< text > [ ^ \n _ \* ] + ?) _ (? ! _ ) \b / , "g" ) ;
157
+ const boldRegex1 = new RegExp ( / \B \* \* (?< text > [ ^ \n ] + ?) \* \* (? ! \* ) \B / , "g" ) ;
158
+ const boldRegex2 = new RegExp ( / \b _ _ (?< text > [ ^ \n _ ] + ?) _ _ (? ! _ ) \b / , "g" ) ;
159
+
159
160
const regexes = [
160
161
{ regex : italicRegex1 , type : "italic" } ,
161
162
{ regex : italicRegex2 , type : "italic" } ,
You can’t perform that action at this time.
0 commit comments