File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -451,7 +451,7 @@ export class WikiMarkdownHandler {
451451 // --> Converts links within given string from Wiki to MD
452452 static convertWikiLinksToMarkdown = ( md : string ) : string => {
453453 let newMdText = md ;
454- let wikiRegex = / \[ \[ .* \] \] / g;
454+ let wikiRegex = / \[ \[ .* ? \] \] / g;
455455 let matches = newMdText . match ( wikiRegex ) ;
456456 if ( matches ) {
457457 let fileRegex = / (?< = \[ \[ ) .* ?(? = ( \] | \| ) ) / ;
@@ -471,11 +471,11 @@ export class WikiMarkdownHandler {
471471 // --> Converts links within given string from MD to Wiki
472472 static convertMarkdownLinksToWikiLinks = ( md : string ) : string => {
473473 let newMdText = md ;
474- let mdLinkRegex = / \[ ( ^ $ | .* ?) \] \( ( .* ) \) / g;
474+ let mdLinkRegex = / \[ ( ^ $ | .* ?) \] \( ( .* ? ) \) / g;
475475 let matches = newMdText . match ( mdLinkRegex ) ;
476476 if ( matches ) {
477477 let fileRegex = / (?< = \( ) .* (? = \) ) / ;
478- let altRegex = / (?< = \[ ) ( ^ $ | .* ) (? = \] ) / ;
478+ let altRegex = / (?< = \[ ) ( ^ $ | .* ? ) (? = \] ) / ;
479479 for ( let mdLink of matches ) {
480480 let fileMatch = mdLink . match ( fileRegex ) ;
481481 if ( fileMatch ) {
You can’t perform that action at this time.
0 commit comments