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

<br /> doesn't show properly in heading row after MD generation #6

Closed
sutram opened this issue Jun 21, 2022 · 11 comments
Closed

<br /> doesn't show properly in heading row after MD generation #6

sutram opened this issue Jun 21, 2022 · 11 comments

Comments

@sutram
Copy link

sutram commented Jun 21, 2022

First of all, I love this plugin!

Even through <br /> is correct markdown, it shows as is in a logseq block after exporting luckysheet to markdown.

This only happens if the table heading has <br /> but works ok if the a normal table row has it.

Instead, if I use [:br], it works fine and a new line is correctly rendered as the heading row in the logseq table block

Thank you!

@sutram sutram changed the title <br /> doesn't show properly after MD conversion <br /> doesn't show properly in heading row after MD generation Jun 21, 2022
@sethyuan
Copy link
Owner

I confirmed this in Logseq 0.7.4, happens in rows too. It seems Logseq changed its behavior regarding <br />, I'll use [:br] for multi-lines as a workaround.

@sethyuan
Copy link
Owner

@sutram New version released, please have a try.

@sutram
Copy link
Author

sutram commented Jun 21, 2022

@sutram New version released, please have a try.

Thanks for fixing it so quickly @sethyuan

Unfortunately, [:br] is still rendered as is in the header row. It works fine in a normal row. I am using Logseq 0.7.4 on Ubuntu 20.04. Please see attached screenshot
Screenshot from 2022-06-20 22-11-59

@sutram
Copy link
Author

sutram commented Jun 21, 2022

I think I figured out why. It is because, the text in the header row is bolded. Without the bold markup ** the line break renders fine. I am not sure how to solve it.

One way to solve it is to separate [:br] out like this:
**Test1**[:br]**next line** . This works but that will mean that it needs to be done for any other markup like italics, underline etc.

@sethyuan
Copy link
Owner

OK, since I know the root cause now, I implemented a solution for this case. I just released a new version with the fix, can you try it?

@sutram
Copy link
Author

sutram commented Jun 21, 2022

OK, since I know the root cause now, I implemented a solution for this case. I just released a new version with the fix, can you try it?

Thanks @sethyuan, it works when I tried it with all bold, all italics and all strikethroughs. It doesn't work with underlines - maybe needs to be surrounded by <u>..</u>?

Unfortunately, I realized there are also other corner cases with mixed markup, where it still fails. Sorry, I should have thought of it earlier.

For example, first line is bold and second is italicized

Screenshot from 2022-06-21 08-05-50

First line is bold and italicized and second is normal

Screenshot from 2022-06-21 08-07-34

First line is bold and italicized and second is strikethrough

Screenshot from 2022-06-21 08-19-54

@sethyuan
Copy link
Owner

sethyuan commented Jun 22, 2022

Strange, I tested these cases and they are all working fine, except underline because I didn't implement it. Can you check if you have v0.7.4 of the plugin?

Also, I tested underline with and discovered that Logseq does not format it well in table cells (fine in table headers?!). I'm not inclined to implement something that does not work well, so I think support for underline should wait.

@sutram
Copy link
Author

sutram commented Jun 23, 2022

Strange, I tested these cases and they are all working fine, except underline because I didn't implement it. Can you check if you have v0.7.4 of the plugin?

Also, I tested underline with and discovered that Logseq does not format it well in table cells (fine in table headers?!). I'm not inclined to implement something that does not work well, so I think support for underline should wait.

I checked and I do have 0.7.4

Screenshot from 2022-06-23 08-27-46

@sethyuan
Copy link
Owner

Can you make a recording of how you reproduce it? I'd like to check how you added formats in Luckysheet.

@sutram
Copy link
Author

sutram commented Jun 24, 2022

@sethyuan I deleted the sheet object, removed the plugin, re-installed it, created a new luckysheet object and tried again. Now, I can't reproduce my issue anymore. It seems like the old code was still being used even after upgrading to LuckySheet 0.7.4.

At this point, the issue can be closed. Thanks for following up.

@sethyuan
Copy link
Owner

Great!

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

No branches or pull requests

2 participants