minor refactor
This commit is contained in:
parent
5f87429c32
commit
2ed7e46063
|
|
@ -5,7 +5,7 @@
|
||||||
"icon": "./icon.svg"
|
"icon": "./icon.svg"
|
||||||
},
|
},
|
||||||
"name": "logseq-mermaid-plugin",
|
"name": "logseq-mermaid-plugin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/index.html",
|
"main": "dist/index.html",
|
||||||
"targets": {
|
"targets": {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
export const convert = (data: string) => {
|
export const convert = (data: string) => {
|
||||||
const matchData = data.match(/```mermaid(.|\n)*?```/gm);
|
const matchData = data.match(/```mermaid(.|\n)*?```/gm);
|
||||||
|
|
||||||
console.log(matchData[0]);
|
|
||||||
|
|
||||||
let toDecode = matchData[0];
|
let toDecode = matchData[0];
|
||||||
toDecode = toDecode.replace('```mermaid', '').replace('```', '');
|
toDecode = toDecode.replace('```mermaid', '').replace('```', '');
|
||||||
toDecode = toDecode.replace('\n', ' ');
|
toDecode = toDecode.replace('\n', ' ');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue