diff --git a/doc_load/load.ts b/doc_load/load.ts index 919dd67..5d4503f 100644 --- a/doc_load/load.ts +++ b/doc_load/load.ts @@ -57,8 +57,7 @@ export class DocParser { let [key, value] = splitTwo(line, ':'); value = value.trimStart(); if (value.startsWith('"') && value.endsWith('"')) { - value = value.substring(1, value.length - 1); - value = value.replace('\\"', '"'); + value = JSON.parse( value ); } key = key.trimEnd(); switch(key){ @@ -110,7 +109,7 @@ ${doc.from_url ? `from_url: ${doc.from_url}\n` : ''}name: "${doc.name}" author: "${doc.author}" star: ${doc.star} fork: ${doc.fork} -desc: "${doc.desc.replaceAll("\"", "\\\"")}" +desc: ${JSON.stringify(doc.desc)} url: ${doc.url} tags: ${JSON.stringify(doc.tags)} ---