remove helper from this branch (to be re-added in child branch for easier reviewing)
This commit is contained in:
@@ -3,7 +3,6 @@ const path = require('path')
|
||||
const patterns = require('./patterns')
|
||||
const getApplicableVersions = require('./get-applicable-versions')
|
||||
const allVersions = require('./all-versions')
|
||||
const removeFPTFromPath = require('./remove-fpt-from-path')
|
||||
|
||||
class Permalink {
|
||||
constructor (languageCode, pageVersion, relativePath, title) {
|
||||
@@ -14,7 +13,8 @@ class Permalink {
|
||||
|
||||
const permalinkSuffix = this.constructor.relativePathToSuffix(relativePath)
|
||||
|
||||
this.href = removeFPTFromPath(path.join('/', languageCode, pageVersion, permalinkSuffix))
|
||||
this.href = path.join('/', languageCode, pageVersion, permalinkSuffix)
|
||||
.replace(patterns.trailingSlash, '$1')
|
||||
|
||||
this.pageVersionTitle = allVersions[pageVersion].versionTitle
|
||||
|
||||
@@ -49,7 +49,6 @@ class Permalink {
|
||||
return '/' + relativePath
|
||||
.replace('index.md', '')
|
||||
.replace('.md', '')
|
||||
.replace(patterns.trailingSlash, '$1')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user