Skip to content

Commit

Permalink
fix: edit url should support versioned subdirectories (#1154)
Browse files Browse the repository at this point in the history
fix: edit url should support versioned subdirectories
  • Loading branch information
endiliey authored Dec 11, 2018
1 parent b2b1cc2 commit f125494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion v1/lib/core/Doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit f125494

Please sign in to comment.