瀏覽代碼

fix eslint errors

v.shebanov 4 年之前
父節點
當前提交
d5cb33028e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      web/src/utils.js

+ 1 - 1
web/src/utils.js

@@ -31,7 +31,7 @@ const SUBST = {
   '-':'-dash-'
 };
 const UNSUBST = Object.assign({}, ...Object.entries(SUBST).map(([a,b]) => ({[b]: a})))
-const FORW = new RegExp(/[:\/\\?#\[\]@~ _‐-]/, 'g');
+const FORW = new RegExp(/[:/\\?#[\]@~ _‐-]/, 'g');
 const BACK = new RegExp(`(${Object.values(SUBST).join('|')})`,'g');
 //export function slugify(str) { return str && encodeURI(str.replace(FORW, e=>SUBST[e])) }
 //export function unslugify(str) { return str && decodeURI(str).replace(BACK, e=>UNSUBST[e]) }