logseq icon indicating copy to clipboard operation
logseq copied to clipboard

Rendering of inline symbols broken in v0.8.9

Open abhilesh opened this issue 3 years ago • 4 comments

What happened?

In previous versions of logseq, some symbols could be used inline without enclosing them in $$. The latest update to v0.8.9 broke this and previously added symbols like \times are no longer rendered correctly.

Reproduce the Bug

  1. Add a native-parser supported inline symbol (\times, \rArr) without enclosing in $$ in any block
  2. Inline symbol is not rendered

Expected Behavior

Inline symbol to be rendered without enclosing in $

Screenshots

Screenshot 2022-10-20 at 08 40 58 Screenshot 2022-10-20 at 08 41 08

Desktop Platform Information

Mac OS v12.6, Logseq v0.8.9

Mobile Platform Information

No response

Additional Context

No response

abhilesh avatar Oct 20 '22 07:10 abhilesh

This regression is still present in v0.8.10.

apahl avatar Nov 03 '22 07:11 apahl

I can reproduce this too. Please fix.

Tubo avatar Nov 05 '22 12:11 Tubo

Still broken. I don't think any of the in-line '' commands are rendering as "\alpha", "\beta", "\gamma", etc are all just rendering as blank space.

Very annoying as it makes much of my previous notes completely unreadable without looking at the markdown directly.

This is on Windows 10, Logseq v0.8.10

noahbcp avatar Nov 07 '22 23:11 noahbcp

Still broken in v0.8.11.

apahl avatar Nov 18 '22 09:11 apahl

The regression is still present in v0.8.12.

It seems almost no-one is using this feature?

apahl avatar Dec 02 '22 11:12 apahl

Still broken in v0.8.13.

apahl avatar Dec 20 '22 07:12 apahl

I've resorted to enclosing these symbols inside the inline Latex demarcator like '$\alpha$'. These work everywhere in the database.

abhilesh avatar Dec 20 '22 12:12 abhilesh

Good tip, thanks.

apahl avatar Dec 20 '22 12:12 apahl

This has been driving me crazy too! I've just been too busy to do anything about it / even complain!

I have some time now and I'm running a git bisect to nail down exactly which commit the problem comes from — I'll report back with results soon!

TheLostLambda avatar Jan 14 '23 14:01 TheLostLambda

Seems to be the breaking commit: image I'll take a look and try to draft a patch!

TheLostLambda avatar Jan 14 '23 15:01 TheLostLambda

Nice work!


From: Brooks Rady @.> Sent: Sunday, January 15, 2023 1:31:31 AM To: logseq/logseq @.> Cc: Noah Piper @.>; Comment @.> Subject: Re: [logseq/logseq] Rendering of inline symbols broken in v0.8.9 (Issue #7054)

Seems to be the breaking commit: [image]https://user-images.githubusercontent.com/6251883/212479822-61115bd0-42d7-482b-a254-4e00cd80462e.png I'll take a look and try to draft a patch!

— Reply to this email directly, view it on GitHubhttps://github.com/logseq/logseq/issues/7054#issuecomment-1382823318, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXQCKKIUFIXFPSKPCFLDF2LWSLBFHANCNFSM6AAAAAARJ3LBVY. You are receiving this because you commented.Message ID: @.***>

noahbcp avatar Jan 14 '23 15:01 noahbcp

Specifically, it's this line for me: image I'm trying to find a way to keep the security check without murdering all \ escapes

TheLostLambda avatar Jan 14 '23 15:01 TheLostLambda

Easy win: image

The sanitizing was taking place on a Clojure map and not actually HTML data — the :html call just needs to come first (to return the HTML from that map) and then it can be sanitized as before!

TheLostLambda avatar Jan 14 '23 16:01 TheLostLambda

I'll test these changes on the latest version of the code then submit a PR!

TheLostLambda avatar Jan 14 '23 16:01 TheLostLambda