main ← fix/rte-quote-display-name
opened 10:07AM - 26 Feb 26 UTC
When `display_name_on_posts` is enabled and `prioritize_username_in_ux` is disab…led, quoting a post in markdown mode correctly attributes the quote to the user's full name (e.g. `[quote="Robin Ward, post:1, topic:2, username:eviltrout"]`). However, the rich text editor lost the display name during the markdown→ProseMirror→markdown round-trip, falling back to just the username.
The ProseMirror quote node only stored `username` in its attributes. When BBCode with a `username:` param was parsed, the display name was discarded. On serialization, only the username survived.
This commit:
- Adds a `displayName` attribute to the ProseMirror quote node spec
- Emits `data-display-name` on the markdown-it aside token so the ProseMirror parser can pick it up
- Updates the serializer to output the display name and `username:` param when present
- Fixes a latent issue where `displayName` remained as an array instead of being joined into a string when the name contains no commas
https://meta.discourse.org/t/397049/12