Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code blocks don't have linefeeds between lines. #191

Open
Smitty010 opened this issue Dec 5, 2022 · 8 comments
Open

code blocks don't have linefeeds between lines. #191

Smitty010 opened this issue Dec 5, 2022 · 8 comments
Labels
parsing issue Some issue in general parsing

Comments

@Smitty010
Copy link

When I download a obsidian article that has the 3 backtips for a code block (e.g., dataview article), the code inside the block runs together with no linefeeds. So, i see something like:

tasksnot donedue before tomorrowsort by priorityhide backlinkhide due date

instead of

not done
due before in 2 days
sort by priority
hide backlink
hide due date

It looks like the linefeeds are getting lost. feels like a bug??

As an aside, it might also be good to not have the block type with the back ticks. So

tasks
not done
due before in 2 days
sort by priority
hide backlink
hide due date

This prevents the code from getting executed by Obsidian just because I added the article.

@deathau
Copy link
Owner

deathau commented Dec 6, 2022

Could you add a link to a page that does this so I can have a closer look? Thanks.

@deathau deathau added the parsing issue Some issue in general parsing label Dec 6, 2022
@Smitty010
Copy link
Author

@a-ski
Copy link

a-ski commented Dec 14, 2022

Hi. Any news on this issue? Seems like the extension ignores line breaks (<br />) while converting preformatted text elements (<pre>). Here's a page you can test out: https://itnext.io/docker-tips-about-none-images-39fb34b20bc5

@setanarut
Copy link

Code blocks are flattened, newlines are ignored. Please someone fix this.

Ekran Resmi 2023-12-20 23 56 33

@Smitty010
Copy link
Author

I think this is related to #272 and #278. I suspect it's a difficult problem, but the new changes made the problem worse.

@setanarut
Copy link

I think this is related to #272 and #278. I suspect it's a difficult problem, but the new changes made the problem worse.

The example I gave is not medium.com. this long article -> https://threedots.tech/post/making-games-in-go/

@Smitty010
Copy link
Author

I don't think it's unique to medium, but medium has a particularly ugly result with the medium code blocks. All of them relate to rendering the code block. Hopefully, there is a general solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parsing issue Some issue in general parsing
Projects
None yet
Development

No branches or pull requests

5 participants