aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/config
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-05-28 12:05:03 +0200
committerSonarTech <sonartech@sonarsource.com>2018-05-28 20:20:43 +0200
commit9819fb14345f1e57c9c1e8f59ec6cda6fe367750 (patch)
treef93c3f4c085f814a95372f190379848065c27f7f /server/sonar-web/config
parent4063ffe9d2b7190497514ff7e476fedb57203d5e (diff)
downloadsonarqube-9819fb14345f1e57c9c1e8f59ec6cda6fe367750.tar.gz
sonarqube-9819fb14345f1e57c9c1e8f59ec6cda6fe367750.zip
get rid of gray-matter (#280)
Diffstat (limited to 'server/sonar-web/config')
-rw-r--r--server/sonar-web/config/documentation-loader/fetch-matter.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-web/config/documentation-loader/fetch-matter.js b/server/sonar-web/config/documentation-loader/fetch-matter.js
index 424d491d948..806332edb2a 100644
--- a/server/sonar-web/config/documentation-loader/fetch-matter.js
+++ b/server/sonar-web/config/documentation-loader/fetch-matter.js
@@ -19,7 +19,7 @@
*/
const fs = require('fs');
const path = require('path');
-const matter = require('gray-matter');
+const { getFrontMatter } = require('../../src/main/js/helpers/markdown');
const compare = (a, b) => {
if (a.order === b.order) return a.title.localeCompare(b.title);
@@ -32,7 +32,7 @@ module.exports = (root, files) => {
return files
.map(file => {
const content = fs.readFileSync(root + '/' + file, 'utf8');
- const headerData = matter(content).data;
+ const headerData = getFrontMatter(content);
return {
name: path.basename(file).slice(0, -3),
relativeName: file.slice(0, -3),