Skip to content

Commit

Permalink
BDE-214: Fix doc regex for custom context path
Browse files Browse the repository at this point in the history
  • Loading branch information
yjulienne-nuxeo committed Feb 14, 2022
1 parent 7aa252a commit c9b8cf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/scripts.babel/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,12 @@ limitations under the License.
regexes.jsf = {};
regexes.jsf.nxpath = new RegExp(`(?:nxpath/(?<repoPath>${regexes.repo.source})(?<path>${regexes.path.source}))`);
regexes.jsf.nxdoc = new RegExp(`(?:nxdoc/(?<repoId>${regexes.repo.source})/(?<docid>${regexes.uuid.source}))`);
regexes.jsf.doc = new RegExp(`/nuxeo/(${regexes.jsf.nxpath.source}|${regexes.jsf.nxdoc.source})`);
regexes.jsf.doc = new RegExp(`/(${regexes.jsf.nxpath.source}|${regexes.jsf.nxdoc.source})`);

regexes.ui = {};
regexes.ui.browse = new RegExp('(?:browse(?<path>\/.+?(?=\\?|$)))');
regexes.ui.docid = new RegExp(`(?:doc[\/A-Za-z_\.0-9]+(?<docid>${regexes.uuid.source}))`);
regexes.ui.doc = new RegExp(`/nuxeo(?:/repo/(?<repo>${regexes.repo.source})|)/ui/#!/(?:${regexes.ui.browse.source}|${regexes.ui.docid.source})`);
regexes.ui.doc = new RegExp(`/(?:repo/(?<repo>${regexes.repo.source})|)ui/#!/(?:${regexes.ui.browse.source}|${regexes.ui.docid.source})`);

function getJsonFromPath(input) {
input = decodeURIComponent(input);
Expand Down

0 comments on commit c9b8cf4

Please sign in to comment.