-
-
Notifications
You must be signed in to change notification settings - Fork 889
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
"content" field is markdown but is advertised as HTML #1871
Comments
Thanks for finding this. Will definitely fix it before 0.14. If markdown is tolerable for you thats great, then i will just set mediatype markdown, put markdown in content and get rid of the source field. |
[2021-11-01 04:07:15-0700] Nutomic:
Thanks for finding this. Will definitely fix it before 0.14. If markdown is tolerable for you thats great, then i will just set mediatype markdown, put markdown in content and get rid of the source field.
Well it's tolerable (slightly because of Peertube also doing it) but as said before having HTML would be much better, specially as your usage of markdown is non-standard (as in not CommonMark).
|
Alright, then i will just fix the html conversion. |
Just a note, but if there's something we're doing that's not commonmark, then we need to open up an issue on are markdown parser, |
[2021-11-02 08:26:29-0700] Dessalines:
Just a note, but if there's something we're doing that's not commonmark, then we need to open up an issue on are markdown parser, `markdown-it`, which should follow the commonmark spec.
Well it might follow the spec for it's base but the subscript, superscript, spoiler and maybe few other features aren't part of common mark.
And should be noted that even though CommonMark is a standard there is few adjustments which can be done on it, for example rendering line breaks as either `<br />` or `<br />\n`.
(I got in this one because PleromaFE preserves newlines because of some legacy, even thought that's quite breaking how HTML should render)
|
That is because we use two different libraries for markdown rendering. One in javascript in the frontend, which supports spoiler tags, and another one in the backend in Rust which apparently doesnt. So we should probably open an issue about it in the comrak repo. @dessalines Do you know if there is some documentation/specification for this spoiler syntax? |
The spoiler tag is the only thing that's not CommonMark, and its totally custom so I wouldn't expect anything else to support it. It's using markdown-it custom containers: https://github.com/markdown-it/markdown-it-container |
I opened a separate issue about the spoiler tag #1884 |
This was seen in #1220.
Currently in lemmy, the content field contains markdown which is tolerable but sadly it's advertised as
text/html
.The text was updated successfully, but these errors were encountered: