prose-im / prose-core-views

Prose core views. Shared messaging views across all platforms.
https://www.npmjs.com/package/@prose-im/prose-core-views
Mozilla Public License 2.0
3 stars 0 forks source link

Markdown rendering doesn't seem ideal #20

Closed nesium closed 3 months ago

nesium commented 9 months ago

Writing F*ing nice in a message gets rendered as if it were F*ing nice*

valeriansaliou commented 9 months ago

Sounds like it could be a snarkdown issue.

nesium commented 9 months ago

Jup. It also seems like code and quotes are not parsed/rendered properly. Although I don't know if we even have styles for that yet (quotes that is, code blocks I have seen).

valeriansaliou commented 9 months ago

No, we have no style for Markdown just yet. I'll open a separate issue for that.

nesium commented 9 months ago

Another case:

Text:

Feb 13 20:43:50 modulemanager   error   Error initializing module 'storage_sql' on 'proxy.ssk.pm': /usr/share/lua/5.1/pr
osody/util/startup.lua:203: module 'DBI' not found:No LuaRocks module found for DBI
        no field package.preload['DBI']
        no file './prosody/DBI.lua'
        no file './DBI.lua'
        no file '/usr/local/share/lua/5.1/prosody/DBI.lua'
        no file '/usr/local/share/lua/5.1/DBI.lua'

Result snarkdown:

Screenshot 2024-02-14 at 13 43 55

Result Github:

Screenshot 2024-02-14 at 13 47 38

I think we should use a "proper" Markdown parser, i.e. something that is tested against CommonMark.

nesium commented 9 months ago

Last example:

Text:

http://upload.nsm.chat:5280/file_share/bYBeUDWO9fctt0OrbX1eTStw/brooke-lark-kVCRP3uiLiE-unsplash.jpg

Result snarkdown:

Screenshot 2024-02-14 at 14 20 19
valeriansaliou commented 9 months ago

I may want to change Markdown library there, looks like it's causing too much trouble!

nesium commented 6 months ago

I'm going to reopen this. See examples…

Screenshot 2024-04-17 at 10 39 52 Screenshot 2024-04-17 at 10 40 16
nesium commented 5 months ago

New issue:

The message…

​```
1
2
3
​```

Renders as

2
3
nesium commented 5 months ago

Lists only render at the beginning of the message or after a newline:

Works:

​```
- A
- B
​```

Works:

​```
Some text

- A
- B
​```

Does not work:

​```
Some text
- A
- B
​```

Github renders it as expected:

Some text

valeriansaliou commented 3 months ago

Closed since formatting is now produced by the core client.