File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -435,15 +435,18 @@ json data(datafile);`}
435435 < Typography > Install:</ Typography >
436436 < code style = { flashcardStyles . codeBlock } > npm install jda numjs pako atob</ code >
437437 < Typography > Load:</ Typography >
438- < code style = { flashcardStyles . codeBlock } dangerouslySetInnerHTML = { {
439- __html : `const fs = require("fs");<br>
440- const jd = require("jda");<br>
441- global.atob = require("atob");<br><br>
442- const fn = "${ docname } .json";<br>
443- var jstr = fs.readFileSync(fn).toString().replace(/\\n/g, "");<br>
444- var data = new jd(JSON.parse(jstr));<br>
445- data = data.decode();`
446- } } />
438+ < pre >
439+ < code style = { flashcardStyles . codeBlock } >
440+ { `const fs = require("fs");\n` }
441+ { `const jd = require("jda");\n` }
442+ { `global.atob = require("atob");\n\n` }
443+ { `const fn = "${ docname } .json";\n` }
444+ { `var jstr = fs.readFileSync(fn).toString().replace(/\\n/g, "");\n` }
445+ { `var data = new jd(JSON.parse(jstr));\n` }
446+ { `data = data.decode();` }
447+ </ code >
448+ </ pre >
449+
447450 < Typography > Read value:</ Typography >
448451 < code style = { flashcardStyles . codeBlock } >
449452 { `console.log(data.data["${ onekey } "]);` }
You can’t perform that action at this time.
0 commit comments