@@ -188,8 +188,8 @@ String wildcardMention(WildcardMentionOption wildcardOption, {
188188/// result may be surprising.
189189///
190190/// The part between "(" and ")" is just a "link destination" (no "link title").
191- /// That destination is simply the stringified [destination] , if provided.
192- /// If that has parentheses in it, the result may be surprising.
191+ /// That destination is the string [destination] , if provided.
192+ /// If [destination] has parentheses in it, the result may be surprising.
193193// TODO: Try harder to guarantee output that creates an inline link,
194194// and in particular, the intended one. We could help with this by escaping
195195// square brackets, perhaps with HTML character references:
@@ -199,8 +199,8 @@ String wildcardMention(WildcardMentionOption wildcardOption, {
199199// > Backtick code spans, autolinks, and raw HTML tags bind more tightly
200200// > than the brackets in link text. Thus, for example, [foo`]` could not be
201201// > a link text, since the second ] is part of a code span.
202- String inlineLink (String visibleText, Uri ? destination) {
203- return '[$visibleText ](${destination ?. toString () ?? '' })' ;
202+ String inlineLink (String visibleText, String ? destination) {
203+ return '[$visibleText ](${destination ?? '' })' ;
204204}
205205
206206/// What we show while fetching the target message's raw Markdown.
@@ -213,7 +213,7 @@ String quoteAndReplyPlaceholder(
213213 SendableNarrow .ofMessage (message, selfUserId: store.selfUserId),
214214 nearMessageId: message.id);
215215 return '${userMentionFromMessage (message , silent : true , users : store )} '
216- '${inlineLink ('said' , url )}: ' // TODO(#1285)
216+ '${inlineLink ('said' , url . toString () )}: ' // TODO(#1285)
217217 '*${zulipLocalizations .composeBoxLoadingMessage (message .id )}*\n ' ;
218218}
219219
@@ -237,6 +237,6 @@ String quoteAndReply(PerAccountStore store, {
237237 // and the extra noise won't much matter with the already probably-long
238238 // message link in there too.
239239 return '${userMentionFromMessage (message , silent : true , users : store )} '
240- '${inlineLink ('said' , url )}:\n ' // TODO(#1285)
240+ '${inlineLink ('said' , url . toString () )}:\n ' // TODO(#1285)
241241 '${wrapWithBacktickFence (content : rawContent , infoString : 'quote' )}' ;
242242}
0 commit comments