-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Client cuts numbers at the beginning of a sentence #14621
Comments
Correction: numbers are not dropped, but shifted to the left. |
Thank's for the confirmation, t3chguy.
|
That would be a query for https://commonmark.org/ as that is the markdown parser used |
So, this could be fixed by a CSS change, right? |
Yes. The current faulty style comes from http://ungoldman.github.io/gfm.css/ but can be overridden in our CSS. |
Anyone planning on fixing this? Would be nice to know where this is on the roadmap 🙈 |
This isn't strictly related to CommonMark, as this is primarily a question of whether we consider a particular message to be Markdown at all. We already treat certain messages as plain text instead of Markdown, such as when they only contain text nodes or disallowed HTML tags. I think the suggested rule of only considering something to be a list when it has two items is a good one and would increase usability. At the very least, we should consider lists with a single empty item to be a plain text (i.e. non-Markdown) message. I'd volunteer to implement this as it has been irking me for some time. This would be a separate change to the proposed CSS fix above. |
Sure, go ahead! |
@SimonBrandner Since there is no activity on this for a month, so can I work on this? |
I am a bit unsure atm, isn't this solved by matrix-org/matrix-react-sdk#6833? Also, no need to ping me specifically |
Just to clarify, no, matrix-org/matrix-react-sdk#6833 doesn't fix this, except as a side-effect in a particular sub-case. That PR makes Element Web stop treating messages such as this one as Markdown:
This has the side-effect of sidestepping the current faulty formatting. However, messages such as the following one are still treated as a Markdown list:
Since the CSS for Markdown lists is still incorrect, the number would still be cut off in this case. So @neer17 if you'd like to take a stab at fixing this, go for it. |
Hey @dbkr @SimonBrandner |
I've assigned you to the issue. If you need any help/have any questions be sure to visit #element-dev:matrix.org! |
@sakshi-0206 If you're not currently working on this issue? Can I be assigned this issue as well? |
Clearing assignment as per https://github.com/vector-im/element-meta/wiki/Guidance-on-assigning-issues - anyone is welcome to work on this, once you have a draft feel free to mention it here and we can set assignment then! |
Hello @Me4Linux, I see some PR's had raised for this issue. Can you check if it is solved this issue ? |
I'm using V1.11.23 now. Still got the problem here that numbers up to 9 digits are truncated. 10 or more work. For example I write: 123456789. |
ok |
the workaround to this is to override the 2em in the CSS from gfm.css .markdown-body ol, .markdown-body ul {
padding: 0 0 0 2em;
} ...and I guess do some dirty heuristic to do that automatically the string length of the number is too wide. |
is this still open? |
Hi @t3chguy i'm new here can you tell me what is the problem to solve? please.. |
The OP describes it pretty well #14621 (comment) - they write a number, only the last 2 digits or so are rendered, the rest is cut off. |
so i need to make it render all the input digits |
Yes, that would be the solution |
This might be my first contribution. I'll try my best! |
Happens on iOS client:
{
"content": {
"body": "46)",
"format": "org.matrix.custom.html",
"formatted_body": "<ol start=\"46\">\n<li></li>\n</ol>",
"msgtype": "m.text"
},
"room_id": "xxx",
"type": "m.room.message"
} Want to point additional attention (since original bug description has a bit different reproduction) that the peer does not see its message at all. {
"content": {
"body": "46) hi",
"format": "org.matrix.custom.html",
"formatted_body": "<ol start=\"46\">\n<li>hi</li>\n</ol>",
"msgtype": "m.text"
},
"room_id": "!HnLctILERbiRchRZkp:pavli.cc",
"type": "m.room.message"
} |
@shadow-identity https://github.com/element-hq/element-ios is the repo for iOS issues. |
Is the issue fixed?? |
It's not. |
Description
When you write a number (3-9 digits) followed by a dot (".") the client drops all digits but the final two.
Steps to reproduce
Write into chat: 123456789.
gives: 89
Or: 500.
shows: 00.
Version information
Platform: web (in-browser) or desktop? Desktop
OS: Debian Buster, confirmed by chat partner with client under iOS and MacOS X.
Version: 1.7.1
The text was updated successfully, but these errors were encountered: