[Bug?] Posts from Misskey display weird #155
Labels
No labels
a11y
Bug
Bug fix
Critical Priority
Documentation
Feature
Feature request
Held for next release cycle
High Priority
Low Priority
Medium Priority
Minor change
Translation/Locale
WIP
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma-fe#155
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Akkoma

Source

Is this Akkoma or them?
Post from a few days ago before I upgraded to latest dev
this is technically them - the send "markdown", but consider
\n
to be a newline, where in markdown\n\n
should be a newlineBy newline do you mean a paragraph break? In every Markdown spec we've heard of,
\n\n
is a paragraph break, not a line break, whereas(two spaces followed by a line feed) is a line break. There are definitely specs that consider a single
\n
to be a line break, though.Does MFM consider a single
\n
to be a line break? (I'm just clarifying the reply above this one. We've tried to find an English-language version of the official MFM spec to no avail, so we don't have a good way to figure this out ourselves.) If that's the case, would a PR for the Akkoma-MFMParser be useful? We'd be happy to contribute one if that's useful.yep your interpretation above is correct - MFM considers
\n
to be a paragraph break, no spaces neededthe above discrepancy can be created by that
Thanks for confirming! Would a PR for Akkoma-MFMParser be welcomed to account for that discrepancy in the MFM Markdown spec?
hm, i'm unsure - akkoma uses its generic markdown processor after preprocessing MFM tags - you might be able to add an option to the markdown parser which will accept single
\n
being a paragraph breakif you can manage that, then go right ahead
the MFM is processed here -> https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/web/common_api/utils.ex#L290
which in turn calls Earmark here -> https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/formatter.ex#L128
you might have to fiddle with preprocessing the input, good luck though, this stuff is incredibly fiddly
We had some stuff come up the last few weeks that kept us busy, but we're taking a look at this now. We'll submit a PR when we have something working (hopefully by the end of this weekend) and/or let folks if it doesn't seem feasible.
content
for posts, also when it's MFM. #381If someone wants to test it, I'm pretty sure you could fix this by changing this line to
"<br>"
https://akkoma.dev/AkkomaGang/mfm-parser/src/branch/akkoma/lib/encoder.ex#L47 (And ofc also fix corresponding tests)The parser already reads newlines, but doesn't do anything with them, it just puts it back.
So if we change the newline to
<br>
, then the markdown parser should leave that tag alone, et voila, we have the newline.I meant to write back sooner, but in short, my health has been less than great lately, and most of my energy is spent on recovering. I alluded to the same issue back in October, but unfortunately things are still nowhere near back to baseline.
I apologize for never taking care of this and never replying. On top of ongoing health issues that are just things I have to deal with, my repetitive strain injuries have flared up again and don't seem to be dying back down. So I've been in the process of learning to type by voice on a daily basis. Which, as a software developer, is not always the easiest thing.
@ArcanaOfSouls No worries. We're all volunteers here, please don't feel pressured. Take care of yourself. You're much more important than this little bug ;)
\n
as newline for MFM #478