Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
chore(docgen): add special case for edit this page on GeoSearch (#1579)
Browse files Browse the repository at this point in the history
  • Loading branch information
samouss authored Sep 18, 2018
1 parent ee6da74 commit 4a4ff70
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docgen/assets/js/editThisPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ if (document.querySelector('.documentation-container')) {

let pathname = document.location.pathname.replace('/react-instantsearch', '');

if (/^\/(?:widgets)\/.+/.test(pathname)) {
// Special case for the GeoSearch
if (/^\/(?:widgets\/GeoSearch).+/.test(pathname)) {
href += '/docgen/src/widgets/GeoSearch.md';
} else if (/^\/(?:widgets)\/.+/.test(pathname)) {
href += `${apiDom}${pathname.replace('.html', '.js')}`;

const instantsearchEncoded = encodeURIComponent('<InstantSearch>');
Expand Down

0 comments on commit 4a4ff70

Please sign in to comment.