@@ -188,8 +188,8 @@ String wildcardMention(WildcardMentionOption wildcardOption, {
188
188
/// result may be surprising.
189
189
///
190
190
/// 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.
193
193
// TODO: Try harder to guarantee output that creates an inline link,
194
194
// and in particular, the intended one. We could help with this by escaping
195
195
// square brackets, perhaps with HTML character references:
@@ -199,8 +199,8 @@ String wildcardMention(WildcardMentionOption wildcardOption, {
199
199
// > Backtick code spans, autolinks, and raw HTML tags bind more tightly
200
200
// > than the brackets in link text. Thus, for example, [foo`]` could not be
201
201
// > 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 ?? '' })' ;
204
204
}
205
205
206
206
/// What we show while fetching the target message's raw Markdown.
@@ -213,7 +213,7 @@ String quoteAndReplyPlaceholder(
213
213
SendableNarrow .ofMessage (message, selfUserId: store.selfUserId),
214
214
nearMessageId: message.id);
215
215
return '${userMentionFromMessage (message , silent : true , users : store )} '
216
- '${inlineLink ('said' , url )}: ' // TODO(#1285)
216
+ '${inlineLink ('said' , url . toString () )}: ' // TODO(#1285)
217
217
'*${zulipLocalizations .composeBoxLoadingMessage (message .id )}*\n ' ;
218
218
}
219
219
@@ -237,6 +237,6 @@ String quoteAndReply(PerAccountStore store, {
237
237
// and the extra noise won't much matter with the already probably-long
238
238
// message link in there too.
239
239
return '${userMentionFromMessage (message , silent : true , users : store )} '
240
- '${inlineLink ('said' , url )}:\n ' // TODO(#1285)
240
+ '${inlineLink ('said' , url . toString () )}:\n ' // TODO(#1285)
241
241
'${wrapWithBacktickFence (content : rawContent , infoString : 'quote' )}' ;
242
242
}
0 commit comments