From f12549424e68b3d5697f46c8697586e19ce1bf98 Mon Sep 17 00:00:00 2001 From: Endilie Yacop Sucipto Date: Tue, 11 Dec 2018 11:22:23 +0800 Subject: [PATCH] fix: edit url should support versioned subdirectories (#1154) fix: edit url should support versioned subdirectories --- v1/lib/core/Doc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v1/lib/core/Doc.js b/v1/lib/core/Doc.js index b3d3e1e3030e..23f9b93969d4 100644 --- a/v1/lib/core/Doc.js +++ b/v1/lib/core/Doc.js @@ -24,7 +24,7 @@ class Doc extends React.Component { if (this.props.version && this.props.version !== 'next') { // If versioning is enabled and the current version is not next, we need to trim out "version-*" from the source if we want a valid edit link. - docSource = docSource.match(new RegExp(/version-.*\/(.*\.md)/, 'i'))[1]; + docSource = docSource.match(new RegExp(/version-.*?\/(.*\.md)/, 'i'))[1]; } const editUrl =