Skip to content

Commit

Permalink
Fix duplicate path separator in URL mappings
Browse files Browse the repository at this point in the history
Some URL mapping constants for specific port projects were defining
duplicate path separators (1). The value of the `ROUTE_ROOT` constant
is set to `/` and the port constants contained the partial path
`${ROUTE_ROOT}/` resulting in duplicate path separators `//`.
This has be fixed by removing the extra `/` character leaving only the
correct `ROUTE_ROOT` constant that resolves into a single path
separator.

References:
  (1) https://github.com/arcticicestudio/nord-docs/blob/53b712c02342b76516b918adb0b3c181d624c6fc/src/config/routes/mappings.js#L364-L412

Fixes GH-169
  • Loading branch information
arcticicestudio committed Jul 30, 2019
1 parent 53b712c commit 12e52c0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/config/routes/mappings.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,55 +361,55 @@ const ROUTE_PORTS = ROUTE_ROOT + PORTS;
* @constant {string}
* @since 0.19.0
*/
const ROUTE_PORTS_ATOM_UI = `${ROUTE_ROOT}/${PORTS}/atom-ui`;
const ROUTE_PORTS_ATOM_UI = `${ROUTE_ROOT}${PORTS}/atom-ui`;

/**
* The route mapping for the "Nord dircolors" port project page.
*
* @constant {string}
* @since 0.18.0
*/
const ROUTE_PORTS_DIRCOLORS = `${ROUTE_ROOT}/${PORTS}/dircolors`;
const ROUTE_PORTS_DIRCOLORS = `${ROUTE_ROOT}${PORTS}/dircolors`;

/**
* The route mapping for the "Nord Emacs" port project page.
*
* @constant {string}
* @since 0.17.0
*/
const ROUTE_PORTS_EMACS = `${ROUTE_ROOT}/${PORTS}/emacs`;
const ROUTE_PORTS_EMACS = `${ROUTE_ROOT}${PORTS}/emacs`;

/**
* The route mapping for the "Nord JetBrains" port project page.
*
* @constant {string}
* @since 0.12.0
*/
const ROUTE_PORTS_JETBRAINS = `${ROUTE_ROOT}/${PORTS}/jetbrains`;
const ROUTE_PORTS_JETBRAINS = `${ROUTE_ROOT}${PORTS}/jetbrains`;

/**
* The route mapping for the "Nord tmux" port project page.
*
* @constant {string}
* @since 0.16.0
*/
const ROUTE_PORTS_TMUX = `${ROUTE_ROOT}/${PORTS}/tmux`;
const ROUTE_PORTS_TMUX = `${ROUTE_ROOT}${PORTS}/tmux`;

/**
* The route mapping for the "Nord Vim" port project page.
*
* @constant {string}
* @since 0.13.0
*/
const ROUTE_PORTS_VIM = `${ROUTE_ROOT}/${PORTS}/vim`;
const ROUTE_PORTS_VIM = `${ROUTE_ROOT}${PORTS}/vim`;

/**
* The route mapping for the "Nord Visual Studio Code" port project page.
*
* @constant {string}
* @since 0.15.0
*/
const ROUTE_PORTS_VISUAL_STUDIO_CODE = `${ROUTE_ROOT}/${PORTS}/visual-studio-code`;
const ROUTE_PORTS_VISUAL_STUDIO_CODE = `${ROUTE_ROOT}${PORTS}/visual-studio-code`;

/**
* The per-route unique `id` attribute values of sections components.
Expand Down

0 comments on commit 12e52c0

Please sign in to comment.