File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,11 @@ const editLinksModule = (function(window) {
99 if ( matches ) {
1010 if ( rule . index !== undefined ) {
1111 result = matches [ rule . index ] ;
12- } else {
12+ }
13+ else if ( rule . rule !== undefined ) {
14+ result = rule . rule ( matches ) ;
15+ }
16+ else {
1317 result = rule . value ;
1418 }
1519 return true ;
@@ -96,7 +100,7 @@ const editLinksModule = (function(window) {
96100 } ,
97101 {
98102 re : / s o l u t i o n s \/ ( s o l u t i o n \/ [ ^ \/ ] * ) / ,
99- index : 1
103+ rule : ( matches ) => matches [ 1 ] . replace ( 'solution/' , 'solutions/' )
100104 } ,
101105 {
102106 re : / s o l u t i o n s \/ / ,
@@ -199,7 +203,6 @@ const editLinksModule = (function(window) {
199203 if ( repoName ) {
200204 let folderName = getFolderName ( ) ;
201205 let branchName = getBranchName ( ) ;
202- folderName = folderName . replace ( 'solution/' , 'solutions/' ) ;
203206 let urlPrefix = "https://github.com/devonfw/" + repoName + "/edit/" + branchName + "/" + folderName + "/" ;
204207 $ ( 'h2,h3,h4,h5' ) . each ( function ( ) {
205208 let headline = $ ( this ) ;
You can’t perform that action at this time.
0 commit comments