File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,15 @@ const fetchOmnivore = async (
124
124
date:: ${ new Date ( savedAt ) . toDateString ( ) }
125
125
> ${ description } `
126
126
127
+ // remove existing block for the same article
128
+ const existingBlocks = await logseq . DB . q < BlockEntity > ( `"${ slug } "` )
129
+ if ( existingBlocks && existingBlocks . length > 0 ) {
130
+ console . log ( existingBlocks )
131
+ for ( const block of existingBlocks ) {
132
+ await logseq . Editor . removeBlock ( block . uuid )
133
+ }
134
+ }
135
+
127
136
const articleBlock = await logseq . Editor . insertBlock (
128
137
targetBlock . uuid ,
129
138
content ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " logseq-omnivore" ,
3
- "version" : " 1.4.2 " ,
3
+ "version" : " 1.4.3 " ,
4
4
"description" : " Import Omnivore highlights and articles into Logseq." ,
5
5
"main" : " dist/index.html" ,
6
6
"targets" : {
You can’t perform that action at this time.
0 commit comments