Skip to content

Commit

Permalink
πŸ› FIX: Fix edge-case when page is '#' (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogsal committed Jun 13, 2021
1 parent 3199db8 commit 5e5ac74
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sphinx_copybutton/_static/copybutton.js_t
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ if( document.documentElement.lang !== undefined
locale = document.documentElement.lang
}

const path_static = `${DOCUMENTATION_OPTIONS.URL_ROOT}_static/`;
let doc_url_root = DOCUMENTATION_OPTIONS.URL_ROOT;
if (doc_url_root == '#') {
doc_url_root = '';
}

const path_static = `${doc_url_root}_static/`;

/**
* Set up copy/paste for code blocks
Expand Down

0 comments on commit 5e5ac74

Please sign in to comment.