mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 17:17:28 +02:00
fix: edit url should support versioned subdirectories (#1154)
fix: edit url should support versioned subdirectories
This commit is contained in:
parent
b2b1cc2b52
commit
f12549424e
1 changed files with 1 additions and 1 deletions
|
@ -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 =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue