From 7a3198c306f2874d32a39194b15ca65b5702168f Mon Sep 17 00:00:00 2001 From: NGPixel Date: Fri, 11 Oct 2019 16:39:23 -0400 Subject: [PATCH] fix: linting --- server/modules/rendering/markdown-plantuml/renderer.js | 3 ++- server/modules/storage/git/storage.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/server/modules/rendering/markdown-plantuml/renderer.js b/server/modules/rendering/markdown-plantuml/renderer.js index a782764b..86cb5bca 100644 --- a/server/modules/rendering/markdown-plantuml/renderer.js +++ b/server/modules/rendering/markdown-plantuml/renderer.js @@ -166,7 +166,8 @@ function append3bytes (b1, b2, b3) { return r } -function encode6bit(b) { +function encode6bit(raw) { + let b = raw if (b < 10) { return String.fromCharCode(48 + b) } diff --git a/server/modules/storage/git/storage.js b/server/modules/storage/git/storage.js index b1e3412d..2ebfbd42 100644 --- a/server/modules/storage/git/storage.js +++ b/server/modules/storage/git/storage.js @@ -25,12 +25,13 @@ const getContenType = (filePath) => { } const getPagePath = (filePath) => { + let fpath = filePath if (process.platform === 'win32') { - filePath = filePath.replace(/\\/g, '/') + fpath = filePath.replace(/\\/g, '/') } let meta = { locale: 'en', - path: _.initial(filePath.split('.')).join('') + path: _.initial(fpath.split('.')).join('') } const result = localeFolderRegex.exec(meta.path) if (result[1]) {