Skip to content
Snippets Groups Projects
Commit 5e8ef6b7 authored by Xiao Gui's avatar Xiao Gui
Browse files

chore: use colon instead of undrsc to esc sl

parent c30aaf93
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,7 @@ const templateMap = {
'Allen Mouse': allenObj
}
const encodeId = id => id.replace(/\//g, '_')
const encodeId = id => id.replace(/\//g, ':')
module.exports = query => {
const {
......
......@@ -16,8 +16,8 @@ export const PARSE_ERROR = {
PARCELLATION_NOT_UPDATED: 'PARCELLATION_NOT_UPDATED',
}
const encodeId = (id: string) => id && id.replace(/\//g, '_')
const decodeId = (codedId: string) => codedId && codedId.replace(/_/g, '/')
const encodeId = (id: string) => id && id.replace(/\//g, ':')
const decodeId = (codedId: string) => codedId && codedId.replace(/:/g, '/')
const endcodePath = (key: string, val: string) => `${key}:${encodeURIComponent(val)}`
const decodePath = (path: string) => {
const re = /^(.*?):(.+)$/.exec(path)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment