File tree Expand file tree Collapse file tree 2 files changed +9
-12
lines changed
packages/webdoc-template-library/src Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ const createLink = (doc: any) => {
286286 }
287287 }
288288
289- return encodeURI (filename || "") + fragmentHash(fragment);
289+ return (filename || "") + fragmentHash(fragment);
290290};
291291
292292/**
Original file line number Diff line number Diff line change @@ -355,7 +355,7 @@ function LinkerPluginShell() {
355355 }
356356
357357 getResourceURI ( subpath : string ) : string {
358- return this . processInternalURI ( encodeURI ( path . join ( "/<siteRoot>" , subpath ) ) ) ;
358+ return this . processInternalURI ( path . join ( "/<siteRoot>" , subpath ) ) ;
359359 }
360360
361361 createURI ( preferredUri : string , outputRelative ?: boolean ) : string {
@@ -374,15 +374,12 @@ function LinkerPluginShell() {
374374 * @return {string } uri with siteRoot
375375 */
376376 processInternalURI ( uri : string , options : { outputRelative ?: boolean } = { } ) : string {
377- if ( ! options . outputRelative ) {
378- uri = uri
379- . replace ( "%3CsiteRoot%3E" , this . siteRoot )
380- . replace ( "//" , "/" ) ; // needed if siteRoot = "";
381- } else {
382- uri = uri . replace ( "/%3CsiteRoot%3E/" , "" ) ;
383- }
384-
385- return uri;
377+ return uri
378+ . replace (
379+ / < s i t e R o o t > / g,
380+ options . outputRelative ? "" : this . siteRoot ,
381+ )
382+ . replace ( / \/ + / g, "/" ) ;
386383 }
387384
388385 /**
@@ -445,7 +442,7 @@ function LinkerPluginShell() {
445442 }
446443 }
447444
448- return encodeURI( probeURI) ;
445+ return probeURI ;
449446 }
450447
451448 /**
You can’t perform that action at this time.
0 commit comments