You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our mention syntax is @{name; id} and name is supposed to be substituted as a link text for the mention. In usual view it is done so with the javascript code from markdown-it-diaspora-mention. In some cases, for example, for mobile view of /stream posts are rendered with the MessageRenderer (e.g., markdownify method) which renders mentions with Diaspora::Mentionable.format method. So when mentions are rendered with this method, the name attribute of the mention is completely ignored and person.name value is put as the link text instead. However, name is rendered if corresponding person was not supplied to the method, so it works as a fallback, rather than the visible name as it works in markdown-it-diaspora-mention.
The text was updated successfully, but these errors were encountered:
So from the code and from the tests I can make conclusion, that it was thought by some devs that the name attribute is some kind of fallback name, when the original username is not available. For example, this test assumes the actual user name substitution instead of the name attribute. So the problem that this attribute is treated differently by the backend and the frontend code. Someone said the feature has never been advertised, so the @{; } syntax is more like an internal thing, but we have to decide what does it mean exactly. Also I wouldn't mind to officialy "advertise" it as a feature.
Our mention syntax is
@{name; id}
and name is supposed to be substituted as a link text for the mention. In usual view it is done so with the javascript code from markdown-it-diaspora-mention. In some cases, for example, for mobile view of/stream
posts are rendered with the MessageRenderer (e.g., markdownify method) which renders mentions with Diaspora::Mentionable.format method. So when mentions are rendered with this method, thename
attribute of the mention is completely ignored andperson.name
value is put as the link text instead. However,name
is rendered if corresponding person was not supplied to the method, so it works as a fallback, rather than the visible name as it works in markdown-it-diaspora-mention.The text was updated successfully, but these errors were encountered: