omnivore-app / logseq-omnivore

Logseq plugin to fetch articles and highlights from Omnivore
MIT License
278 stars 15 forks source link

Importing article {{{ content }}} stops at first section #114

Closed thiswillbeyourgithub closed 7 months ago

thiswillbeyourgithub commented 1 year ago

Hi!

The link to the article : https://lynettebye.com/blog/2023/4/20/inside-the-minds-of-adhd

Relevant section of the article : image

The imported content stops at the first section: image

Let me know if I can help provide more information :)

jacksonh commented 1 year ago

@thiswillbeyourgithub do you mind opening the markdown of the page in another editor like VS Code, and checking to see if the full content is there?

thiswillbeyourgithub commented 1 year ago

I just opened it in vim and confirm that the rest of the article is not there.

Asgoret commented 1 year ago

Is there any workaround or something?

thiswillbeyourgithub commented 1 year ago

Not that I found. It's a pretty serious issue that can be devastating to one's workflow :/

jacksonh commented 1 year ago

I was able to replicate this with the top article, i have a feeling Logseq fails when we import the header elements like

# When you have a task that requires a lot of thought, how often do you avoid or delay getting started?
thiswillbeyourgithub commented 1 year ago

Oh. I think logseq throws an error when you use "# something" inside a multiline block. Maybe this error is hidden when it's from a plugin ? If that's the issue that's great because that means you can split the content in several blocks as I wished for in #113 :D

sywhb commented 1 year ago

Yeah, I believe Logseq still doesn't allow multiple headings or sub-block in the same block so it causes this error.

Asgoret commented 11 months ago

@sywhb is there any issue or MR on logseq side?

yoghurtdewdew commented 11 months ago

The problem that I found is {{{ content }}} could not work. I wish to see original content below the Highlights. So the Template of Highlight is set as:

> {{{text}}} [⤴️]({{{highlightUrl}}}) {{#labels}} #[[{{{name}}}]] {{/labels}}

{{#note.length}}note:: {{{note}}} {{/note.length}}

[[omnivore original content]]
collapsed:: true
    {{{ content }}}

It just could not work at all. Hope there will be new options for the page content preferences of this plugin.

sywhb commented 10 months ago

Hey @Asgoret sorry for the late reply. Yeah, Logseq has some issues displaying the content in markdown format in a block.

I believe it is because Logseq does not allow nested blocks generated by templates

Asgoret commented 10 months ago

@sywhb no worries. Do you know maybe, there is any issue/mr on logseq side? So I can bump it out

sywhb commented 10 months ago

@Asgoret I believe I saw one before. Let me look for it

hzxsw commented 10 months ago

image image image image

@sywhb Hello, I have encountered the same issue. After conducting some testing and analysis, I suspect that it might be caused by two consecutive line breaks, resulting in the truncation of the text. I hope this information can be helpful in resolving the problem. Thank you.

thiswillbeyourgithub commented 10 months ago

Pretty sure that no, it's caused by having headers in a multiline block. In your example the issue is having a line starting with ###

thiswillbeyourgithub commented 10 months ago

@sywhb a simple workaround for now would be to escape the leading # of the text. Either simply adding a space between the newline and #, or backslash in each newline +#. Etc. Maybe rrplacing by simply a larger bolded font via inline html?

A more advanced fix would be to split the large block into different blocks, which is apparently more what ligseq was designed to handle anyway. But then you might want each highlight to appear as children of the right block of text, and might run into issue with respecting the template etc. All in all this is more complicated.

I'd really like to have the quick workaround at least because I'm coding a script that automatically creates anki flashcards of my highlights via logseq and this is keeping me stuck. Hence why the quick workaround above :)

thiswillbeyourgithub commented 9 months ago

I'd really like to have the quick workaround at least because I'm coding a script that automatically creates anki flashcards of my highlights via logseq and this is keeping me stuck. Hence why the quick workaround above :)

Up :)

thiswillbeyourgithub commented 8 months ago

I'd really like to have the quick workaround at least because I'm coding a script that automatically creates anki flashcards of my highlights via logseq and this is keeping me stuck. Hence why the quick workaround above :)

Up :)

Respectful up :)

thiswillbeyourgithub commented 7 months ago

That seems to work perfectly! Thank you immensely. I'll tell you more later when I finish creating an automatic flashcard creator based on this. Thanks!

sywhb commented 7 months ago

Thanks for the confirmation! @thiswillbeyourgithub

I finally got time to finish this PR and hopefully it will resolve this issue permanently ~